mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Validate performClose: in MMWindow and MMFullscreenWindow
Failing to validate would cause the "Close" menu item to be disabled in full-screen.
This commit is contained in:
@@ -298,6 +298,15 @@ static int numFullscreenWindows = 0;
|
||||
[super performClose:sender];
|
||||
}
|
||||
|
||||
- (BOOL)validateMenuItem:(NSMenuItem *)item
|
||||
{
|
||||
if ([item action] == @selector(vimMenuItemAction:)
|
||||
|| [item action] == @selector(performClose:))
|
||||
return [item tag];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end // MMFullscreenWindow
|
||||
|
||||
|
||||
|
||||
@@ -129,4 +129,13 @@
|
||||
[super performClose:sender];
|
||||
}
|
||||
|
||||
- (BOOL)validateMenuItem:(NSMenuItem *)item
|
||||
{
|
||||
if ([item action] == @selector(vimMenuItemAction:)
|
||||
|| [item action] == @selector(performClose:))
|
||||
return [item tag];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end // MMWindow
|
||||
|
||||
Reference in New Issue
Block a user