(state: State)
| 204 | } |
| 205 | |
| 206 | function processCursorRight(state: State) { |
| 207 | if (state.cursor >= state.value.length) { |
| 208 | return Effect.succeed(Action.Beep()) |
| 209 | } |
| 210 | const cursor = Math.min(state.cursor + 1, state.value.length) |
| 211 | return Effect.succeed( |
| 212 | Action.NextFrame({ |
| 213 | state: { ...state, cursor, error: Option.none() } |
| 214 | }) |
| 215 | ) |
| 216 | } |
| 217 | |
| 218 | function processTab(state: State, options: Options) { |
| 219 | if (state.value === options.default) { |