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

This commit is contained in:
Kovid Goyal 2018-08-29 17:56:29 +05:30
commit 66b890bfd3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -565,7 +565,12 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) {
} else {
if (screen->modes.mouse_tracking_mode) {
int sz = encode_mouse_event(w, upwards ? GLFW_MOUSE_BUTTON_4 : GLFW_MOUSE_BUTTON_5, PRESS, 0);
if (sz > 0) { mouse_event_buf[sz] = 0; write_escape_code_to_child(screen, CSI, mouse_event_buf); }
if (sz > 0) {
mouse_event_buf[sz] = 0;
for (s = abs(s); s > 0; s--) {
write_escape_code_to_child(screen, CSI, mouse_event_buf);
}
}
} else {
fake_scroll(abs(s), upwards);
}