Forgot Apple likes to scroll backwards

Fixes #7475
This commit is contained in:
Kovid Goyal 2024-05-27 10:51:40 +05:30
parent 80d544c19f
commit c57f65079f
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -973,7 +973,11 @@ scroll_event(double xoffset, double yoffset, int flags, int modifiers) {
s = scale_scroll(screen->modes.mouse_tracking_mode, xoffset, is_high_resolution, &screen->pending_scroll_pixels_x, global_state.callback_os_window->fonts_data->cell_width);
if (s) {
if (screen->modes.mouse_tracking_mode) {
#ifdef __APPLE__
int sz = encode_mouse_scroll(w, s > 0 ? 6 : 7, modifiers);
#else
int sz = encode_mouse_scroll(w, s < 0 ? 6 : 7, modifiers);
#endfi
if (sz > 0) {
mouse_event_buf[sz] = 0;
for (s = abs(s); s > 0; s--) {