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
{{ message }}
Repository navigation
Horizontal mouse wheel events treated as vertical scrolling #4848
For bug reports, I have checked if the bug is reproducible in the latest version of fzf
Output of fzf --version
0.73.1 (Homebrew)
OS
Linux
macOS
Windows
Etc.
Shell
bash
zsh
fish
Problem / Steps to reproduce
Note
No AI was used! I noticed you closed contributions due to an influx of low-effort PRs, so I put in the time to keep the code minimal and fully understand the changes. I love your work, please keep going!
One day, I encountered jittering when scrolling up/down on my macOS trackpad in fzf. I realized it was because the horizontal scroll component is factored in, so if you scroll 45° up and right or 45° down and left, the scroll counteracts itself! I propose that horizontal mouse wheel events should not count as vertical scrolling.
Reproducing
Use a terminal that supports horizontal scrolling (e.g., Ghostty, Alacritty, Kitty, etc.).
Scroll horizontally in fzf.
Scrolling left should scroll upwards. Scrolling right should scroll downwards.
The Fix
I believe the issue has to do with lines 908-915 of light.go. The logic for SGR mouse wheel events is as follows. Is this intended?
Thanks, to be clear, I'm not against AI. It's a great tool if you know what you're doing. I was just tired of automated, low-effort PRs that weren't backed by any hands-on experience and provided no real benefit to (sentient) users.
Anyway, that behavior was not intended. I think I didn't think about the horizontal scrolling when I wrote the code. I'll cherry-pick your commits. Thanks!
Activity
junegunn commentedon Jun 28, 2026
Thanks, to be clear, I'm not against AI. It's a great tool if you know what you're doing. I was just tired of automated, low-effort PRs that weren't backed by any hands-on experience and provided no real benefit to (sentient) users.
Anyway, that behavior was not intended. I think I didn't think about the horizontal scrolling when I wrote the code. I'll cherry-pick your commits. Thanks!
Fix horizontal mouse wheel being treated as vertical scroll