macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.47k stars 680 forks source link

Fix menu items like Edit.Cut/Copy not disabled in normal mode #1308

Closed ychin closed 1 year ago

ychin commented 1 year ago

We are using auto-enabling of menu items, which require each target of macaction to implement validateMenuItem properly. It was done in MMTextView, but not MMCoreTextView. Also, as part of fixing this up, just add more comments, and make sure to call back to superclass etc to make the code more robust.