mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
95a3120b40e1fc7fd322ac0a326eefbc8297bd7b
macOS applies a acceleration to the mouse scroll wheel which is often frustrating to use. In particular, a single click on the scroll wheel generates a fractional scroll, which doesn't do anything in MacVim as it scrolls by line. Fix this by forcing each scroll event to scroll at least one line (this is configurable to be higher, or 0 which means use the old behavior). Also add an option to simply turn off acceleration and scroll a fixed number of lines. Also, fix horizontal scrolling using mouse wheel. In macOS, the way to scroll horizontally using a normal wheel is to hold Shift key and scroll, and the OS will convert that to a horizontal scroll event. However, we were sending the shift modifier to Vim as well, which interprets it as <S-ScrollWheelRight> which is not what we want (this scrolls a whole page). We manually remove the shift modifier when we detect this. It does mean there's functionally no way to send shift-scroll wheel events to Vim, but it is ok, as macOS generally works this way and it's consistent with how native GUI apps work.
…
Vim - the text editor - for macOS
-
MacVim homepage: https://macvim-dev.github.io/macvim
-
Download the latest version from Releases
-
How to build MacVim from source
-
Vim README: README_vim.md
Languages
Vim Script
52%
C
38.1%
Objective-C
3.1%
Roff
1.6%
Makefile
1.2%
Other
3.2%