spawn Claude in fullscreen mode and route mouse-wheel to PgUp/PgDown
Spawn `claude` directly as the tmux command with CLAUDE_CODE_NO_FLICKER=1 so Claude Code runs in its fullscreen TUI mode (input box pinned at bottom, owns its own scrollback). Mouse wheel events are converted to PgUp/PgDown key input — universal scroll signal that Claude, less, vim normal mode all respect, and sidesteps the mouse-mode-but-no-scroll dead end where TUI apps capture mouse without binding the wheel. Drops the 1000-row tmux canvas + SingleChildScrollView experiment in favor of viewport-sized tmux and Claude's native bottom-pinning. Makefile install target now kills the clide tmux server so the new config takes effect immediately. Marked TEMP — to be removed once we no longer need the rapid-iteration loop. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -174,18 +174,14 @@ class TerminalViewState extends State<TerminalView> {
|
||||
if (event is! PointerScrollEvent) return;
|
||||
final lh = renderTerminal.lineHeight;
|
||||
if (lh <= 0) return;
|
||||
final position = renderTerminal.getCellOffset(event.localPosition);
|
||||
final lines = (event.scrollDelta.dy / lh).round().clamp(-5, 5);
|
||||
// Always send PgUp/PgDown for scroll — the mouse-escape-sequence
|
||||
// path tends to be a no-op in TUI apps (claude, vim) that capture
|
||||
// mouse for other purposes. PgUp/PgDown is the universal scroll.
|
||||
for (var i = 0; i < lines.abs(); i++) {
|
||||
final up = lines < 0;
|
||||
final handled = widget.terminal.mouseInput(
|
||||
up ? TerminalMouseButton.wheelUp : TerminalMouseButton.wheelDown,
|
||||
TerminalMouseButtonState.down,
|
||||
position,
|
||||
widget.terminal.keyInput(
|
||||
lines < 0 ? TerminalKey.pageUp : TerminalKey.pageDown,
|
||||
);
|
||||
if (!handled && widget.simulateScroll) {
|
||||
widget.terminal.keyInput(up ? TerminalKey.arrowUp : TerminalKey.arrowDown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user