Skip to content

fix(terminal): restore scrollback by reverting tmux alternate-screen overrides#479

Merged
davidpoblador merged 1 commit into
mainfrom
fix/tmux-scrollback-alternate-screen
May 29, 2026
Merged

fix(terminal): restore scrollback by reverting tmux alternate-screen overrides#479
davidpoblador merged 1 commit into
mainfrom
fix/tmux-scrollback-alternate-screen

Conversation

@davidpoblador
Copy link
Copy Markdown
Member

Summary

Reverts the two tmux settings added in a455855 (set -g alternate-screen off and set -ga terminal-overrides ',*:smcup@:rmcup@') that caused the Coding Agent's TUI redraws to pollute the scrollback buffer with duplicated full-screen content (#395).

With these removed, inner programs use their own alternate screen normally and scrollback stays clean.

Tradeoff

This re-accepts the native trackpad-scroll regression that a455855 originally fixed: inside the alternate screen Ghostty converts scroll events to arrow keys, so trackpad scroll navigates within the TUI rather than the scrollback buffer. Per the discussion in #395, clean scrollback is the preferred behavior; users can navigate with Shift+scroll or the keyboard. mouse off is left unchanged.

Tests

Removed the two tests that asserted the reverted settings (testConfigKeepsOuterTerminalOutOfAlternateScreen, testConfigDisablesPaneAlternateScreen). Full suite green: Executed 191 tests, 0 failures.

Closes #395

🤖 Generated with Claude Code

…overrides

Commit a455855 added `alternate-screen off` and a `smcup@:rmcup@`
terminal-override to get native trackpad scroll in tmux terminals. The side
effect is that the Coding Agent's TUI redraws dump full-screen content into
the scrollback buffer, causing disorienting jumps with duplicated content.

Revert both settings so inner programs use their own alternate screen and
scrollback stays clean. This re-accepts the trackpad-scroll regression
(Ghostty converts scroll to arrow keys inside the alternate screen); users
can navigate with Shift+scroll or the keyboard. Drop the two tests that
asserted the reverted settings.

Closes #395

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@davidpoblador davidpoblador merged commit e6491c7 into main May 29, 2026
2 checks passed
@davidpoblador davidpoblador deleted the fix/tmux-scrollback-alternate-screen branch May 29, 2026 10:32
This was referenced May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: scrollback causes disorienting jumps with duplicate content

1 participant