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

This commit is contained in:
Kovid Goyal 2019-01-14 10:10:22 +05:30
commit 63ff3cfb9f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -615,6 +615,10 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) {
// Only use wheel_scroll_multiplier if we are scrolling kitty scrollback or in mouse // 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 // tracking mode, where the application is responsible for interpreting scroll events
yoffset *= OPT(wheel_scroll_multiplier); yoffset *= OPT(wheel_scroll_multiplier);
} else if (OPT(wheel_scroll_multiplier) < 0) {
// ensure that changing scroll direction still works, even though
// we are not using wheel_scroll_multiplier
yoffset *= -1;
} }
s = (int) round(yoffset); s = (int) round(yoffset);
// apparently on cocoa some mice generate really small yoffset values // apparently on cocoa some mice generate really small yoffset values