-
-
Notifications
You must be signed in to change notification settings - Fork 815
Description
Version: 0.14.3 (202603122332)
OS: macOS Sequoia 15.5
Shell: zsh
Describe the bug
When scrolling with the touchpad in an idle terminal (at the shell prompt, no program running), scroll events are injected into the PTY as up/down arrow key escape sequences (^[[A / ^[[B). This causes the shell to cycle through command history instead of scrolling the terminal scrollback buffer.
This is a regression — it did not happen in earlier versions.
Steps to reproduce
- Open a terminal block
- Make sure the shell is idle at the prompt (no program running)
- Scroll up or down using the touchpad
Expected behavior
Scrolling the touchpad should scroll the terminal scrollback buffer.
Actual behavior
The shell cycles through command history as if the up/down arrow keys were being pressed.
Proof
Running cat -v at the prompt and scrolling with the touchpad produces:
^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A
These are raw ESC[A (cursor up) and ESC[B (cursor down) sequences being written directly into the PTY - identical to what keyboard arrow keys produce. The terminal is not intercepting scroll events before they reach the shell.
Suspected cause
This appears to be a regression introduced in v0.14.1 with the "Claude Code Scroll Fix" (PR #2956), which changed scroll handling behavior in the terminal.