mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Avoid spurious inertial trackpad scrolling
When 'inertia' is enabled the trackpad sometimes sends events that tells Vim to scroll zero lines. Ignore such events, else Vim sometimes seems to scroll a little bit too far.
This commit is contained in:
@@ -1880,13 +1880,13 @@ static void netbeansReadCallback(CFSocketRef s,
|
||||
|
||||
int numLines = (dy != 0) ? (int)round(dy) : (int)round(dx);
|
||||
if (numLines < 0) numLines = -numLines;
|
||||
if (numLines == 0) numLines = 1;
|
||||
|
||||
if (numLines != 0) {
|
||||
#ifdef FEAT_GUI_SCROLL_WHEEL_FORCE
|
||||
gui.scroll_wheel_force = numLines;
|
||||
gui.scroll_wheel_force = numLines;
|
||||
#endif
|
||||
|
||||
gui_send_mouse_event(button, col, row, NO, flags);
|
||||
gui_send_mouse_event(button, col, row, NO, flags);
|
||||
}
|
||||
|
||||
#ifdef FEAT_BEVAL
|
||||
if (p_beval && balloonEval) {
|
||||
|
||||
Reference in New Issue
Block a user