From 5029a9ad5ac1a9bc31598dd17dffd16e46e260db Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 28 Aug 2020 08:14:49 +0530 Subject: [PATCH] Dont use wheel_scroll_multiplier when sending scroll events in the main screen --- kitty/mouse.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kitty/mouse.c b/kitty/mouse.c index d9439aec8..3ed5ff3cf 100644 --- a/kitty/mouse.c +++ b/kitty/mouse.c @@ -685,9 +685,8 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags, int modifiers) { s = (int)round(pixels) / (int)global_state.callback_os_window->fonts_data->cell_height; screen->pending_scroll_pixels = pixels - s * (int) global_state.callback_os_window->fonts_data->cell_height; } else { - if (screen->linebuf == screen->main_linebuf || !screen->modes.mouse_tracking_mode) { - // Only use wheel_scroll_multiplier if we are scrolling kitty scrollback or in mouse - // tracking mode, where the application is responsible for interpreting scroll events + if (!screen->modes.mouse_tracking_mode) { + // Dont use multiplier if we are sending events to the application yoffset *= OPT(wheel_scroll_multiplier); } else if (OPT(wheel_scroll_multiplier) < 0) { // ensure that changing scroll direction still works, even though