Apply negative scroll multiplier in alternate screen mode

Fixes kovidgoyal/kitty#1299
This commit is contained in:
Luflosi 2019-01-14 00:07:17 +01:00
parent 30b5e8bf8f
commit 7421a0b9e3
No known key found for this signature in database
GPG Key ID: 14140F703B7D8362

View File

@ -615,6 +615,8 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) {
// 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
yoffset *= OPT(wheel_scroll_multiplier);
} else if (OPT(wheel_scroll_multiplier) < 0) {
yoffset *= -1;
}
s = (int) round(yoffset);
// apparently on cocoa some mice generate really small yoffset values