(state: TextState)
| 3604 | ) |
| 3605 | |
| 3606 | const processTextCursorLeft = (state: TextState) => { |
| 3607 | if (state.cursor <= 0) { |
| 3608 | return Effect.succeed(Action.Beep()) |
| 3609 | } |
| 3610 | const cursor = state.cursor - 1 |
| 3611 | return Effect.succeed( |
| 3612 | Action.NextFrame({ |
| 3613 | state: { ...state, cursor, error: Option.none() } |
| 3614 | }) |
| 3615 | ) |
| 3616 | } |
| 3617 | |
| 3618 | const processTextCursorRight = (state: TextState) => { |
| 3619 | if (state.cursor >= state.value.length) { |
no test coverage detected