From 021dfcad392dbc005335d9651e51665d22ac8403 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sun, 23 Dec 2018 12:49:00 +0100 Subject: [PATCH] Fix broken downward scrolling --- kitty/mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/mouse.c b/kitty/mouse.c index 459fe6cdd..8fc835e7f 100644 --- a/kitty/mouse.c +++ b/kitty/mouse.c @@ -580,7 +580,7 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) { global_state.callback_os_window->pending_scroll_pixels = pixels; return; } - s = ((int)round(pixels)) / global_state.callback_os_window->fonts_data->cell_height; + s = (int)round(pixels) / (int)global_state.callback_os_window->fonts_data->cell_height; global_state.callback_os_window->pending_scroll_pixels = pixels - s * (int) global_state.callback_os_window->fonts_data->cell_height; } else { s = (int) round(yoffset * OPT(wheel_scroll_multiplier));