(state: TextState)
| 3868 | ) |
| 3869 | |
| 3870 | const processTextCursorLeft = (state: TextState) => { |
| 3871 | if (state.cursor <= 0) { |
| 3872 | return Effect.succeed(Action.Beep()) |
| 3873 | } |
| 3874 | const cursor = state.cursor - 1 |
| 3875 | return Effect.succeed( |
| 3876 | Action.NextFrame({ |
| 3877 | state: { ...state, cursor, error: Option.none() } |
| 3878 | }) |
| 3879 | ) |
| 3880 | } |
| 3881 | |
| 3882 | const processTextCursorRight = (state: TextState) => { |
| 3883 | if (state.cursor >= state.value.length) { |
no test coverage detected