Problem
Two input-handling regressions in the boxen REPL:
3a) Mousewheel navigates history instead of scrolling output pane
Mousewheel up/down events are mapped to history-prev/history-next (same as up/down arrows) instead of scrolling the output pane.
3b) Option-Left / Option-Right insert literal b / f
macOS Terminal sends ESC b (option-left) and ESC f (option-right) for word-jump. The boxen input line is consuming the ESC and then inserting the following byte (b or f) as a literal character instead of decoding the sequence as a word-jump command.
Repro
Mousewheel:
frontier-cli
- Issue any command that produces a few lines of output
- Scroll mousewheel up
- Observe: history navigates instead of pane scrolling
Option-arrows:
frontier-cli in macOS Terminal.app (or iTerm2 with default "Option as Meta = Esc+" setting)
- Type some text on the input line
- Press Option-Left
- Observe:
b inserted at cursor (should jump cursor one word left)
- Press Option-Right
- Observe:
f inserted at cursor (should jump cursor one word right)
Expected
- Mousewheel: scrolls output pane (up = older content, down = newer). History should remain bound to up/down arrows only.
- Option-Left/Right: jumps cursor by one word in the input line, same as readline/bash convention.
Context
Discovered during C.6 soak after flipping default REPL from linenoise to boxen (PR #802). Linenoise handled both correctly (option-arrows via its built-in word-motion bindings; mousewheel naturally passed through to the terminal since linenoise didn't capture mouse events).
Grouping these two as one issue / one fix since both live in the boxen input-line key/event decoder.
Severity
P1 each — both are muscle-memory regressions for terminal users. Workaround: --plain falls back to linenoise.
Problem
Two input-handling regressions in the boxen REPL:
3a) Mousewheel navigates history instead of scrolling output pane
Mousewheel up/down events are mapped to history-prev/history-next (same as up/down arrows) instead of scrolling the output pane.
3b) Option-Left / Option-Right insert literal
b/fmacOS Terminal sends
ESC b(option-left) andESC f(option-right) for word-jump. The boxen input line is consuming theESCand then inserting the following byte (borf) as a literal character instead of decoding the sequence as a word-jump command.Repro
Mousewheel:
frontier-cliOption-arrows:
frontier-cliin macOS Terminal.app (or iTerm2 with default "Option as Meta = Esc+" setting)binserted at cursor (should jump cursor one word left)finserted at cursor (should jump cursor one word right)Expected
Context
Discovered during C.6 soak after flipping default REPL from linenoise to boxen (PR #802). Linenoise handled both correctly (option-arrows via its built-in word-motion bindings; mousewheel naturally passed through to the terminal since linenoise didn't capture mouse events).
Grouping these two as one issue / one fix since both live in the boxen input-line key/event decoder.
Severity
P1 each — both are muscle-memory regressions for terminal users. Workaround:
--plainfalls back to linenoise.