Description
The mouse wheel is dead in the TUI inside the VS Code integrated terminal. Arrow keys work, but scrolling the wheel does nothing. This started with VS Code 1.105.
The root cause is not opencode. The wheel events are silently swallowed by xterm.js, the terminal emulator bundled in VS Code, in the alt buffer. The regression was introduced in xterm 5.6.0-beta.119. I verified this with byte-level A/B testing between VS Code 1.104 (beta.118) and 1.105 (beta.119): a raw-mode pty listener plus CDP-injected wheel events. Pixel deltas under roughly 50px produce zero bytes on the pty, so the app never sees them. This affects trackpads, smooth wheels and low-sensitivity mice; fast-scrolling mice can pass the threshold, which is why it is so easy to miss.
Analysis and fix already submitted upstream:
Opening this here so opencode users hitting it in VS Code have a searchable reference, and a place to pick up the fix once VS Code ships a newer xterm.
Plugins
None
OpenCode version
Latest (dev build), run inside the VS Code integrated terminal
Steps to reproduce
- VS Code 1.105 or later on Windows, open the integrated terminal
- Start opencode (TUI)
- Hover the list and scroll the mouse wheel
- Trackpad / smooth wheel / low-sensitivity mouse: scroll does nothing
Screenshot and/or share link
Not applicable, see byte-level evidence in the linked xterm.js issue
Operating System
Windows 11
Terminal
VS Code integrated terminal (bundled xterm)
Description
The mouse wheel is dead in the TUI inside the VS Code integrated terminal. Arrow keys work, but scrolling the wheel does nothing. This started with VS Code 1.105.
The root cause is not opencode. The wheel events are silently swallowed by xterm.js, the terminal emulator bundled in VS Code, in the alt buffer. The regression was introduced in xterm 5.6.0-beta.119. I verified this with byte-level A/B testing between VS Code 1.104 (beta.118) and 1.105 (beta.119): a raw-mode pty listener plus CDP-injected wheel events. Pixel deltas under roughly 50px produce zero bytes on the pty, so the app never sees them. This affects trackpads, smooth wheels and low-sensitivity mice; fast-scrolling mice can pass the threshold, which is why it is so easy to miss.
Analysis and fix already submitted upstream:
Opening this here so opencode users hitting it in VS Code have a searchable reference, and a place to pick up the fix once VS Code ships a newer xterm.
Plugins
None
OpenCode version
Latest (dev build), run inside the VS Code integrated terminal
Steps to reproduce
Screenshot and/or share link
Not applicable, see byte-level evidence in the linked xterm.js issue
Operating System
Windows 11
Terminal
VS Code integrated terminal (bundled xterm)