qvacua / vimr

VimR — Neovim GUI for macOS in Swift
https://twitter.com/VimRefined
MIT License
6.61k stars 218 forks source link

Trackpad moves cursor instead of scrolling the window #1043

Closed shanesmith closed 3 weeks ago

shanesmith commented 6 months ago

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.

edgarcosta commented 4 months ago

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.

mmerickel commented 3 months ago

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

edgarcosta commented 3 months ago

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

shanesmith commented 3 months ago

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. 🤔

georgeharker commented 3 months ago

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.