mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
File->Close sends performClose:
This fixes a bug where <D-w> would close not close the about dialog box, but instead would close a (partially) obscured window.
This commit is contained in:
@@ -214,14 +214,20 @@ static int numFullscreenWindows = 0;
|
||||
[view setFrameOrigin:origin];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark Proxy/Decorator/whatever stuff
|
||||
|
||||
- (void)scrollWheel:(NSEvent *)theEvent
|
||||
{
|
||||
[[view textView] scrollWheel:theEvent];
|
||||
}
|
||||
|
||||
- (void)performClose:(id)sender
|
||||
{
|
||||
id wc = [self windowController];
|
||||
if ([wc respondsToSelector:@selector(performClose:)])
|
||||
[wc performClose:sender];
|
||||
else
|
||||
[super performClose:sender];
|
||||
}
|
||||
|
||||
@end // MMFullscreenWindow
|
||||
|
||||
|
||||
|
||||
@@ -117,4 +117,13 @@
|
||||
[super setContentSize:size];
|
||||
}
|
||||
|
||||
- (void)performClose:(id)sender
|
||||
{
|
||||
id wc = [self windowController];
|
||||
if ([wc respondsToSelector:@selector(performClose:)])
|
||||
[wc performClose:sender];
|
||||
else
|
||||
[super performClose:sender];
|
||||
}
|
||||
|
||||
@end // MMWindow
|
||||
|
||||
@@ -65,5 +65,6 @@
|
||||
|
||||
- (IBAction)addNewTab:(id)sender;
|
||||
- (IBAction)toggleToolbar:(id)sender;
|
||||
- (IBAction)performClose:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@@ -606,6 +606,14 @@
|
||||
[vimController sendMessage:ToggleToolbarMsgID data:nil];
|
||||
}
|
||||
|
||||
- (IBAction)performClose:(id)sender
|
||||
{
|
||||
// NOTE: File->Close is bound to this action message instead binding it
|
||||
// directly to the below vim input so that File->Close also works for
|
||||
// auxiliary windows such as the About dialog. (If we were to bind the
|
||||
// below, then <D-w> will not close e.g. the About dialog.)
|
||||
[vimController addVimInput:@"<C-\\><C-N>:conf q<CR>"];
|
||||
}
|
||||
|
||||
|
||||
// -- NSWindow delegate ------------------------------------------------------
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ an 10.295 File.New\ Tab :tabnew<CR>
|
||||
an <silent> 10.310 File.&Open\.\.\. :maca fileOpen:<CR>
|
||||
an 10.328 File.-SEP0- <Nop>
|
||||
an <silent> 10.330 File.Close\ Window<Tab>:qa :confirm qa<CR>
|
||||
an 10.331 File.Close<Tab>:q :confirm q<CR>
|
||||
an <silent> 10.331 File.Close :maca performClose:<CR>
|
||||
"an 10.331 File.Close\ Tab :tabclose<CR>
|
||||
|
||||
an 20.460 Edit.-SEP4- <Nop>
|
||||
|
||||
Reference in New Issue
Block a user