(state: AutoCompleteState)
| 3309 | } |
| 3310 | |
| 3311 | const processAutoCompleteCursorUp = (state: AutoCompleteState) => { |
| 3312 | if (state.filtered.length === 0) { |
| 3313 | return Effect.succeed(Action.Beep()) |
| 3314 | } |
| 3315 | const cursor = autoCompleteCursor(state) |
| 3316 | const nextCursor = cursor === 0 ? state.filtered.length - 1 : cursor - 1 |
| 3317 | return Effect.succeed(Action.NextFrame({ state: { ...state, index: state.filtered[nextCursor] } })) |
| 3318 | } |
| 3319 | |
| 3320 | const processAutoCompleteCursorDown = (state: AutoCompleteState) => { |
| 3321 | if (state.filtered.length === 0) { |
no test coverage detected