Repository navigation
Conversation
…returns 0 Wheel events in the alternate screen (no scrollback) are converted into a single up/down sequence so full-screen TUI apps can scroll. Since 5.6.0-beta.119 this path is gated on consumeWheelEvent() returning a non-zero amount, which silently drops the event when the pixel delta dampens and floors to zero lines (|deltaY| < ~50px on typical setups), when shift is held, or when renderer dims are not ready yet. The magnitude is never used by this path - the sequence sent is always exactly one ESC[A/ESC[B - so the gate is purely destructive and contradicts the comment above it. Keep the call to sync the partial scroll accumulator for the wheel-scroll option, but don't gate on it. Byte-level A/B evidence (VS Code 1.104 beta.118 vs 1.105 beta.119, instrumented bundle + raw-mode pty listener in the alt screen): 1.104 sends one ESC[B for every probe; 1.105 swallows all pixel probes below ~50px while line-mode and large deltas pass.
Author
|
Added byte-level verification on the current release as well, VS Code 1.128.0 (ships xterm 6.1.0-beta.288). Same setup: raw-mode pty listener in the alt screen, instrumented runtime, injected wheel events. Event log and probe timestamps aligned:
So the bug is present in the release everyone uses today, not just the old beta. Trackpads, smooth wheels and low-sensitivity mice (small pixel deltas, or shift+wheel) still get zero bytes. The reason most users never notice is that fast-scrolling mice send deltas above the ~50px threshold and the wheel "works". Full history of this issue: 5.6.0-beta.118 (no gate, all six probes passed) -> 5.6.0-beta.119 (gate added, small pixel deltas dropped) -> 6.1.0-beta.288 (gate still there, same behavior). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since 5.6.0-beta.119 the alt-buffer wheel handler gates on
consumeWheelEvent()returning a non-zero amount, and drops the event when it rounds to zero. That kills the wheel for full-screen TUI apps on trackpads, smooth wheels and low-sensitivity scroll settings: any single pixel delta below roughly one cell height gets dampened, floored to 0, and never reaches the app. It also swallows shift+wheel entirely.The sequence this path sends is always exactly one ESC[A/ESC[B, the return value is only used as a boolean, and the comment above the code already states the behavior is "simply send a single up or down sequence". So the gate is leftover from the old line-scrolling implementation and has nothing to gain here.
This keeps the
consumeWheelEvent()call so the partial-scroll accumulator stays in sync, but onlydeltaY === 0skips sending.Verification
Byte-level A/B between VS Code 1.104 (xterm 5.6.0-beta.118) and 1.105 (5.6.0-beta.119): raw-mode pty listener in the alt screen, instrumented bundle logging
consumeWheelEvent()input and result per event.1.104 sent one ESC[B for every probe, 1.105 dropped all pixel probes under 50px (0 bytes on the pty) while line-mode and large deltas passed. Renderer dims were healthy in both runs, so the failures are the dampening path, not a sizing race.
Tests: 4 new unit cases (small pixel delta, negative delta, zero delta, app-handles-wheel-itself). Full unit suite passes (2342 tests), lint clean.