Add scroll-fix plugin: fixes terminal scroll-to-top regression (all platforms)#35683
Add scroll-fix plugin: fixes terminal scroll-to-top regression (all platforms)#35683cruzlauroiii wants to merge 1 commit intoanthropics:mainfrom
Conversation
7cc4010 to
e134a88
Compare
|
Updated with v2 scroll fix:
|
e134a88 to
4993caf
Compare
…latforms) - Clamps ALL cursor-up per write call to viewport height - Catches both Ink renderer AND readline/prompt eraseLines - Ctrl+6 freeze toggle for manual scroll control - git diff compatible patches (git apply -C0) - Marketplace install: /plugin install scroll-fix@cruzlauroiii-plugins Fixes anthropics#33814, anthropics#826, anthropics#11801, anthropics#3648, anthropics#34794, anthropics#33367, anthropics#34242
|
@Anthropic please fix this upstream, I don't want to install a minified JS patch just so I can have long sessions in Claude Code |
Bug report: plugin hangs all child Node.js processesThe Root causeThe Impact
Suggested fix
var _t = setTimeout(function () {
try {
process.stdin.on("data", function (d) { ... });
process.stdin.unref();
} catch (e) {}
}, 2000);
_t.unref();Or guard against non-interactive contexts entirely (e.g. skip when |
|
Even with the patch installed, i'm still getting some random flashes, iterm2 with tmux. It's fine in my VSCode Terminal without tmux. The flashes seems less sporadic as they are with out the patch. |
|
Currently i'm using the hotkey ctrl + 6 to scroll up and toggle when im
finished, i will toggle.
…On Thu, Mar 19, 2026 at 11:22 PM Jon Whitcraft ***@***.***> wrote:
*jwhitcraft* left a comment (anthropics/claude-code#35683)
<#35683 (comment)>
Even with the patch installed, i'm still getting some random flashes,
iterm2 with tmux. It's fine in my VSCode Terminal without tmux.
The flashes seems less sporadic as they are with out the patch.
—
Reply to this email directly, view it on GitHub
<#35683 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGJTFYJMZPJCXEUJBD7CPAL4RQGCFAVCNFSM6AAAAACWWBDKAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAOJQHEYDENJVGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Summary
Adds a plugin that fixes the terminal scroll-to-top regression affecting all platforms and terminals.
Root cause
Ink renderer's emits N cursor-up () sequences where N = previously rendered line count. When N > viewport height, terminals follow the cursor above the visible area, snapping to the top of scrollback. This happens inside synchronized output blocks so even DEC mode 2026 doesn't prevent it — the terminal follows the final cursor position.
Affects all terminals (Windows Terminal, iTerm2, Terminal.app, VS Code, tmux, Kitty, etc.) on all platforms.
Plugin structure
plugins/scroll-fix/
├── .claude-plugin/plugin.json
├── scroll-fix.cjs # Preload module (--require)
├── hooks/hooks.json # SessionStart hook
├── scripts/
│ ├── check-scroll-fix.js # Hook handler
│ └── install.js # CLI patcher (install/uninstall)
└── README.md
Duplicates fixed
Upstream: microsoft/terminal#14774
Test plan