(state: TextState, options: TextOptionsReq)
| 3642 | ) |
| 3643 | |
| 3644 | const processTab = (state: TextState, options: TextOptionsReq) => { |
| 3645 | if (state.value === options.default) { |
| 3646 | return Effect.succeed(Action.Beep()) |
| 3647 | } |
| 3648 | const value = state.value.length === 0 ? options.default : state.value |
| 3649 | return Effect.succeed( |
| 3650 | Action.NextFrame({ |
| 3651 | state: { ...state, value, cursor: value.length, error: Option.none() } |
| 3652 | }) |
| 3653 | ) |
| 3654 | } |
| 3655 | |
| 3656 | const defaultTextProcessor = (input: string, state: TextState) => { |
| 3657 | const beforeCursor = state.value.slice(0, state.cursor) |
no test coverage detected