Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/MacVim/Actions.plist
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
<string></string>
<key>performMiniaturize:</key>
<string></string>
<key>performMaximize:</key>
<string></string>
<key>performZoom:</key>
<string></string>
<key>recentFilesDummy:</key>
Expand Down
1 change: 1 addition & 0 deletions src/MacVim/MMWindowController.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,6 @@
- (IBAction)fontSizeDown:(id)sender;
- (IBAction)findAndReplace:(id)sender;
- (IBAction)zoom:(id)sender;
- (IBAction)performMaximize:(id)sender;

@end
16 changes: 16 additions & 0 deletions src/MacVim/MMWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,22 @@ - (IBAction)zoom:(id)sender
[vimController sendMessage:ZoomMsgID data:data];
}

- (IBAction)performMaximize:(id)sender
{
NSWindow *win = [self window];
NSRect maxFrame = [[win screen] frame];
int maxRows, maxColumns;
NSData *data;

[vimView constrainRows:&maxRows columns:&maxColumns toSize:maxFrame.size];
data = [NSData dataWithBytes:(int [2]){maxRows, maxColumns} length:(2 * sizeof(int))];
[[self vimController] sendMessage:SetTextDimensionsMsgID data:data];
[[vimView textView] setMaxRows:maxRows columns:maxColumns];

[win setFrameOrigin:maxFrame.origin];
[win setIsZoomed:YES];
}



// -- Services menu delegate -------------------------------------------------
Expand Down