Fix scroll wheel reporting on NS

* src/nsterm.m (- mouseDown): Clear scroll wheel
accumulators.
This commit is contained in:
Po Lu 2021-11-25 19:02:32 +08:00
parent 7fea9c8415
commit d0ea2a87f4

View file

@ -6604,7 +6604,10 @@ - (void)mouseDown: (NSEvent *)theEvent
lines = abs (totalDeltaX / lineHeight);
x = totalDeltaX;
totalDeltaX = totalDeltaX % lineHeight;
if (!x_coalesce_scroll_events)
totalDeltaX = 0;
else
totalDeltaX = totalDeltaX % lineHeight;
totalDeltaY = 0;
}
else if (abs (totalDeltaY) >= abs (totalDeltaX)
@ -6616,7 +6619,10 @@ - (void)mouseDown: (NSEvent *)theEvent
lines = abs (totalDeltaY / lineHeight);
y = totalDeltaY;
totalDeltaY = totalDeltaY % lineHeight;
if (!x_coalesce_scroll_events)
totalDeltaY = 0;
else
totalDeltaY = totalDeltaY % lineHeight;
totalDeltaX = 0;
}