vimr icon indicating copy to clipboard operation
vimr copied to clipboard

Trackpad moves cursor instead of scrolling the window

Open shanesmith opened this issue 1 year ago • 5 comments

Previously, scrolling with the trackpad would scroll the whole window, but since snapshot 20231110.205939 the cursor is now moved instead. The window does scroll once the cursor reaches the edge.

shanesmith avatar Jan 03 '24 03:01 shanesmith

Does anyone have a workaround for this? For example, a temporary fix could be to force the cursor to jump to the end of the window.

edgarcosta avatar Mar 06 '24 21:03 edgarcosta

A couple more details as I'm experiencing this while converting from vim+macvim to nvim+vimr:

  1. my friend who uses a mouse with scroll wheel doesn't have the issue, it does seem specific to the trackpad input
  2. with the default mouse support from a base neovim install, scrolling works correctly in a terminal shell (using iTerm2) - it's just vimr where I see this issue of the trackpad scrolling the cursor

mmerickel avatar Mar 12 '24 21:03 mmerickel

I can confirm that I do not have scroll issues with neovim in iterm2

edgarcosta avatar Mar 14 '24 15:03 edgarcosta

I'm fairly certain this issue is caused by #1015, specifically this update. If you expand that diff upwards you'll notice that scrolling by trackpad is indeed handled differently.

Not going to pretend I understand exactly what's going on, but in that diff I see that the code went from a scroll() to a winSetCursor(), I wonder why. 🤔

shanesmith avatar Mar 14 '24 15:03 shanesmith

We had to mode to a different API. I’ll take a look and see if there’s a way to do the smooth scroll without cursor.

georgeharker avatar Mar 14 '24 17:03 georgeharker