akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.36k stars 59 forks source link

Pixel scrolling reverses direction when stopping #476

Open diocletiann opened 1 year ago

diocletiann commented 1 year ago

Thanks all the work on this, it's my favorite Neovim GUI for touchpad pixel scrolling on MacOS. Would it be possible to disable the direction reversal when scrolling stops in the middle of a row and continue moving in the direction of the scroll until the partial row is fully visible? The direction reversal is very distracting and I think this alternative could look very smooth.

akiyosi commented 1 year ago

@restfuladi Hi, Thanks for this issue report. I have made a trial fix for this problem.

https://github.com/akiyosi/goneovim/actions/runs/5145975259

I would appreciate your feedback on whether this is in line with your expected behavior.

akiyosi commented 1 year ago

@restfuladi Gentle Ping

diocletiann commented 1 year ago

Hey, thanks for jumping on this so fast. I tested them side by side and now I'm not sure which one I prefer, they are both jumpy when the caret hits the window edge. If you could scroll partial lines per pixel and not allow the caret into them it would be ideal. I also noticed these are both running in Intel emulation mode and I'm not sure how much that costs.

akiyosi commented 1 year ago

@restfuladi Thanks for reply. Your opinion is well understood. One possible approach would be, for example, to leave the amount of pixel scrolling that is less than the height of the row after a touchpad scrolling operation. However, this would require manually adjusting back to the exact row-by-row viewport after pixel scrolling, which some people may not like.

akiyosi commented 1 year ago

I also noticed these are both running in Intel emulation mode and I'm not sure how much that costs.

goneovim does not yet prepare binaries for the Apple M1 arm64. This will be a topic for future improvement.