mirror of
https://github.com/textmate/textmate.git
synced 2026-01-23 05:37:55 -05:00
This is done by overloading performKeyEquivalent: for the main menu (by setting it to OakMainMenu in MainMenu.xib). The default implementation of performKeyEquivalent: does not know about scope selectors so it will sometimes call the wrong actions. For example a bundle overloading ⌘X for “-dyn.selection” may still see the item fire with a selection. This wasn’t a problem previously, as we set the key equivalents via (deprecated) Carbon API (so presumably Cocoa didn’t know about the keys). This is a preliminary implementation, I just want it out there to have it tested for edge-cases. Long-term we can probably remove the overload of performKeyEquivalent: on OakTextView, which sort of does similar (stops Cocoa from executing the wrong menu actions or interfering with multi-stroke key bindings).