You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you're right, and the comment in the code doesn't hold up. The wheel already doesn't mirror the keyboard on the vertical axis either, it pans the viewport while j/k move the cursor, which was a deliberate change in #173. So "single mental model" doesn't describe current behavior. The swallow and that comment both came in with the original mouse PR (#142) as a scope cut. Other deferred mouse interactions, including overlay item clicks, have since shipped, but neither the PR discussion nor the review established this rationale.
so the ask is fair. The reason it isn't a two-line change is that horizontal scroll costs much more per event than vertical. The scroll offset is part of the render cache key, so every horizontal step throws away the whole per-line cache and forces a full re-render of the file. Each vertical event only moves YOffset, and any render it needs is coalesced to the end of the burst. A trackpad flick sends tens of events, so wiring horizontal straight through would re-create #179, where a fast scroll wedged the event loop. It needs burst handling first, and there's more than one defensible way to do that, so I want to prototype against a real gesture rather than pick one on paper.
separately, your report exposed an unbounded keyboard offset: hold the right arrow long enough and it scrolls past the widest line, at which point every row cuts to nothing and the pane goes blank with no « to tell you why. #337 bounds that path. It adds no mouse support.
which terminal and multiplexer are you in? Zellij currently consumes horizontal wheel events for terminal panes instead of forwarding them, so if that's your setup the gesture wouldn't reach revdiff even once it's implemented. On tmux they're forwarded from 3.3 onward.
Activity
umputun commentedon Aug 28, 2026
you're right, and the comment in the code doesn't hold up. The wheel already doesn't mirror the keyboard on the vertical axis either, it pans the viewport while
j/kmove the cursor, which was a deliberate change in #173. So "single mental model" doesn't describe current behavior. The swallow and that comment both came in with the original mouse PR (#142) as a scope cut. Other deferred mouse interactions, including overlay item clicks, have since shipped, but neither the PR discussion nor the review established this rationale.so the ask is fair. The reason it isn't a two-line change is that horizontal scroll costs much more per event than vertical. The scroll offset is part of the render cache key, so every horizontal step throws away the whole per-line cache and forces a full re-render of the file. Each vertical event only moves
YOffset, and any render it needs is coalesced to the end of the burst. A trackpad flick sends tens of events, so wiring horizontal straight through would re-create #179, where a fast scroll wedged the event loop. It needs burst handling first, and there's more than one defensible way to do that, so I want to prototype against a real gesture rather than pick one on paper.separately, your report exposed an unbounded keyboard offset: hold the right arrow long enough and it scrolls past the widest line, at which point every row cuts to nothing and the pane goes blank with no
«to tell you why. #337 bounds that path. It adds no mouse support.which terminal and multiplexer are you in? Zellij currently consumes horizontal wheel events for terminal panes instead of forwarding them, so if that's your setup the gesture wouldn't reach revdiff even once it's implemented. On tmux they're forwarded from 3.3 onward.
keeping this open.
fix(ui): bound horizontal scroll to the widest rendered line
nnutter commentedon Sep 2, 2026
Things are always complicated. =(
I'm using Ghostty and Herdr. I forked at let AI try and it seems to be working (for me),
https://github.com/nnutter/revdiff/blob/4e83c2d0ccafa392ba6bc45526edb2ec626479ae/app/ui/mouse.go#L174-L183
fix(ui): bound horizontal scroll to the widest rendered line
feat(ui): scroll the diff pane with the horizontal wheel (#411)