fix(tui): scroll transcript when composer is empty, not history#1211
Conversation
Restore pre-Hmbown#1117 behaviour where plain Up/Down scroll the transcript when the composer is empty. Terminals that map trackpad gestures to arrow keys rely on this to scroll the history area. When the composer has text, Up/Down still navigate input history. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Thanks for the targeted patch. I do not think we should merge this exact behavior as-is: plain keyboard Up on an empty composer is also the standard input-history recall path, and the KeyCode::Up event does not tell us whether it came from a real keyboard arrow or from a terminal mapping trackpad scroll to arrows. This would fix one scroll setup by regressing another common workflow. The useful direction is still valid, but it needs a way to avoid stealing empty-composer history recall, such as terminal-specific handling, a separate option, or a mouse/scroll path that does not collapse to the same key event. I am leaving this open rather than merging the current head. |
…nals
Instead of unconditionally changing Up/Down behavior, gate the
empty-composer-scroll path behind a new `tui.composer_arrows_scroll`
config option (default false). Users whose terminals map trackpad
gestures to arrow keys can opt in via:
[tui]
composer_arrows_scroll = true
When enabled, empty-composer Up/Down scroll the transcript; otherwise
plain arrows always navigate input history (preserving Hmbown#1117 default).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Thank you so much I keep accidentally doing this |
Summary
#1117 changed plain Up/Down to always navigate input history, but this broke transcript scrolling for terminals that map trackpad gestures to arrow key events.
Instead of reverting #1117 (which would regress the keyboard history-recall workflow), this PR adds an opt-in config option:
When enabled, empty-composer Up/Down scroll the transcript instead of recalling history. Default behavior is unchanged (#1117).
Changes
TuiConfig::composer_arrows_scroll— new config field (defaultfalse)App::composer_arrows_scroll— runtime flag read from config at startuphandle_composer_history_arrow— gates scroll-on-empty behind the optionTest plan
🤖 Generated with Claude Code