(state: AutoCompleteState)
| 3547 | } |
| 3548 | |
| 3549 | const processAutoCompleteCursorUp = (state: AutoCompleteState) => { |
| 3550 | if (state.filtered.length === 0) { |
| 3551 | return Effect.succeed(Action.Beep()) |
| 3552 | } |
| 3553 | const cursor = autoCompleteCursor(state) |
| 3554 | const nextCursor = cursor === 0 ? state.filtered.length - 1 : cursor - 1 |
| 3555 | return Effect.succeed(Action.NextFrame({ state: { ...state, index: state.filtered[nextCursor] } })) |
| 3556 | } |
| 3557 | |
| 3558 | const processAutoCompleteCursorDown = (state: AutoCompleteState) => { |
| 3559 | if (state.filtered.length === 0) { |
no test coverage detected