Repository navigation
config: add gtk-horizontal-tab-scroll option - #12659
Conversation
Add a boolean config option to enable/disable two-finger horizontal touchpad scrolling for switching tabs. Defaults to true to preserve existing behavior. When tab scrolling is disabled or the scroll source is not a touchpad, forward horizontal scroll events to the terminal so applications like neovim can handle them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
tested this, and it allows me to use touchpad and horizontal scroll wheel to scroll in nvim |
|
I use a trackball with drag scrolling, so vertical scrolls often have some small horizontal delta too. This means when I'm scrolling quickly in Ghostty, I end up switching tabs accidentally, and it prevents me from switching to ghostty full-time on Linux. Can confirm this PR resolves the issue for me. |
|
@00JCIV00 this is a much appreciated option, although this is still a bit buggy, and you can feel when using devices such as a trackpoint:
|
|
@3v1n0 I'm not fully understanding the issue you're describing. Can you layout your desired behavior and how this change goes against that? The intent behind the change isn't to block horizontal scroll events, but rather to have them pass through to underlying processes instead of being consumed by Ghostty. This allows processes that support horizontal scrolling (such as neovim) to work properly. Admittedly, I've only tested it on a touchpad and a mouse. If it's not doing the above on a trackpoint, I'm happy to take another look. |
A trackball may behave the same, and also a touchpad; in general:
|
| if (priv.pending_horizontal_scroll_reset) |v| { | ||
| _ = glib.Source.remove(v); | ||
| priv.pending_horizontal_scroll_reset = null; | ||
| return @intFromBool(true); |
There was a problem hiding this comment.
I think the problem is this one, it should return false otherwise we consume the event.
I've implemented a GTK toggle (gtk-horizontal-tab-scroll) for the 2-finger tab swiping introduced in #10575.
This resolves the issue presented in #11566. Simply put, this allows users to decide whether or not they want to use horizontal tab scrolling or just have the events passed through. Passing through the horizontal scroll events allows programs like Neovim to use them for horizontal scrolling.
This PR was largely generated by Claude Code and fully reviewed/refined by me.