From 71a958f6f635c1a19259c1719649d8dcd4bc9a90 Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Thu, 16 May 2024 16:22:45 -0400 Subject: [PATCH] fix: horizontal scrolling direction Fixes kovidgoyal#7439. --- kitty/mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/mouse.c b/kitty/mouse.c index d4cbc140b..792403de4 100644 --- a/kitty/mouse.c +++ b/kitty/mouse.c @@ -970,7 +970,7 @@ scroll_event(double xoffset, double yoffset, int flags, int modifiers) { s = scale_scroll(screen->modes.mouse_tracking_mode, xoffset, is_high_resolution, &screen->pending_scroll_pixels_x, global_state.callback_os_window->fonts_data->cell_width); if (s) { if (screen->modes.mouse_tracking_mode) { - int sz = encode_mouse_scroll(w, s > 0 ? 6 : 7, modifiers); + int sz = encode_mouse_scroll(w, s < 0 ? 6 : 7, modifiers); if (sz > 0) { mouse_event_buf[sz] = 0; for (s = abs(s); s > 0; s--) {