Merge branch 'fix_downward_scrolling' of https://github.com/Luflosi/kitty

This commit is contained in:
Kovid Goyal 2018-12-23 17:25:46 +05:30
commit be71f5f1f4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -580,7 +580,7 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) {
global_state.callback_os_window->pending_scroll_pixels = pixels; global_state.callback_os_window->pending_scroll_pixels = pixels;
return; 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; global_state.callback_os_window->pending_scroll_pixels = pixels - s * (int) global_state.callback_os_window->fonts_data->cell_height;
} else { } else {
s = (int) round(yoffset * OPT(wheel_scroll_multiplier)); s = (int) round(yoffset * OPT(wheel_scroll_multiplier));