mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 02:17:03 +00:00
Fix incorrect calculation of pending_scroll_pixels
This commit is contained in:
parent
bbefcb2cd2
commit
d19b29ced0
1 changed files with 1 additions and 1 deletions
|
|
@ -552,7 +552,7 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) {
|
|||
}
|
||||
s = abs(((int)round(pixels))) / global_state.callback_os_window->fonts_data->cell_height;
|
||||
if (pixels < 0) s *= -1;
|
||||
global_state.callback_os_window->pending_scroll_pixels = pixels - s;
|
||||
global_state.callback_os_window->pending_scroll_pixels = pixels - s * global_state.callback_os_window->fonts_data->cell_height;
|
||||
} else {
|
||||
s = (int) round(yoffset * OPT(wheel_scroll_multiplier));
|
||||
global_state.callback_os_window->pending_scroll_pixels = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue