mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
d412800d3cc931b59152d491ab62b58972c873d2
Previously MacVim would see a lot of duplicate window menu items like "Enter Full Screen" or "Tile Window to Left of Screen" when the user toggles between two windows. This is because the `setWindowsMenu:` call was injecting these items, but AppKit isn't smart enough to de-duplicate them (unlike the window list at the bottom). Just fix this by making a copy of the main menu before passing it in. This way every time we try to set a main menu (which happens whenever we jump among Vim windows as each Vim can have different menu items), it will be set with a fresh one that doesn't have the injected menu items in it. - This also requires adding a refresh functionality because adding/removing items to the original menu no longer get automatically reflected to the app since it only knows about the copied version. Also, set NSFullScreenMenuItemEverywhere to prevent AppKit from injecting "Enter Full Screen" items. MacVim already has similar menu items to handle that. Also, remove old private API call to `setAppleMenu:`. As far as I could tell this is not useful anymore in recent macOS versions and that line of code was written in 2008. Fix #566, Fix #992
…
Vim - the text editor - for macOS
-
MacVim homepage https://macvim-dev.github.io/macvim
-
Download the latest version from Releases.
-
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%