Skip to content

Scroll terminal history with the mouse and repaint the prompt after clear - #14

Merged
sionic-khope merged 1 commit into
mainfrom
fix/terminal-wheel-scroll-and-clear
Jul 21, 2026
Merged

Scroll terminal history with the mouse and repaint the prompt after clear#14
sionic-khope merged 1 commit into
mainfrom
fix/terminal-wheel-scroll-and-clear

Conversation

@sionic-khope

Copy link
Copy Markdown
Contributor

Summary

  • Mouse/trackpad scrolling now works in the terminal: scroll deltas accumulate into page steps through history (TerminalScrollAccumulator — sub-step carry, multi-step flicks, direction reversals drop the opposite remainder, legacy line-delta wheels scaled to points). Previously only the Page Up/Down keys navigated history.
  • ⌘K clear no longer leaves a fully blank terminal: clearing wipes the buffer including the shell's prompt line, so the panel now sends Ctrl-L afterwards and the shell repaints its prompt immediately.

Test plan

  • swift build -Xswiftc -warnings-as-errors clean
  • swift test -Xswiftc -warnings-as-errors: 206/206 (new: accumulator step/carry/reversal tests)

🤖 Generated with Claude Code

https://claude.ai/code/session_015peMZyaHEmxDzyzNyhYeR5

…lear

The terminal only paged through history via Page Up/Down keys — wheel and
trackpad scrolling did nothing. Scroll events now accumulate into page
steps (TerminalScrollAccumulator: carry below one step, multi-step flicks,
direction reversals drop the opposite remainder, legacy line-delta wheels
scaled into point space).

Clearing (⌘K) wipes the whole buffer including the shell's prompt line and
left the terminal fully blank until the next output; after clearing, the
panel now sends Ctrl-L so the shell repaints its prompt immediately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015peMZyaHEmxDzyzNyhYeR5
@sionic-khope
sionic-khope merged commit ecf9e9c into main Jul 21, 2026
1 check passed
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.

1 participant