(state: TextState, options: TextOptionsReq)
| 3906 | ) |
| 3907 | |
| 3908 | const processTab = (state: TextState, options: TextOptionsReq) => { |
| 3909 | if (state.value === options.default) { |
| 3910 | return Effect.succeed(Action.Beep()) |
| 3911 | } |
| 3912 | const value = state.value.length === 0 ? options.default : state.value |
| 3913 | return Effect.succeed( |
| 3914 | Action.NextFrame({ |
| 3915 | state: { ...state, value, cursor: value.length, error: Option.none() } |
| 3916 | }) |
| 3917 | ) |
| 3918 | } |
| 3919 | |
| 3920 | const defaultTextProcessor = (input: string, state: TextState) => { |
| 3921 | const beforeCursor = state.value.slice(0, state.cursor) |
no test coverage detected