Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for the blank lines when entering fullscreen on Yosemite #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
18 changes: 10 additions & 8 deletions src/MacVim/MMWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
*
* The window is always kept centered and resizing works more or less the same
* way as in windowed mode.
*
*
*/

#import "MMAppController.h"
Expand Down Expand Up @@ -170,7 +170,7 @@ - (id)initWithVimController:(MMVimController *)controller

[win setDelegate:self];
[win setInitialFirstResponder:[vimView textView]];

if ([win styleMask] & NSTexturedBackgroundWindowMask) {
// On Leopard, we want to have a textured window to have nice
// looking tabs. But the textured window look implies rounded
Expand Down Expand Up @@ -479,7 +479,7 @@ - (void)createScrollbarWithIdentifier:(int32_t)ident type:(int)type

- (BOOL)destroyScrollbarWithIdentifier:(int32_t)ident
{
BOOL scrollbarHidden = [vimView destroyScrollbarWithIdentifier:ident];
BOOL scrollbarHidden = [vimView destroyScrollbarWithIdentifier:ident];
shouldResizeVimView = shouldResizeVimView || scrollbarHidden;
shouldMaximizeWindow = shouldMaximizeWindow || scrollbarHidden;

Expand Down Expand Up @@ -1130,22 +1130,24 @@ - (void)window:(NSWindow *)window
// Fade out window, remove title bar and maximize, then fade back in.
// (There is a small delay before window is maximized but usually this is
// not noticeable on a relatively modern Mac.)
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
[[vimView tabBarControl] setStyleNamed:@"Unified"];

[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
[context setDuration:0.5*duration];
[[window animator] setAlphaValue:0];
} completionHandler:^{
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
[[vimView tabBarControl] setStyleNamed:@"Unified"];
[self updateTablineSeparator];
[self maximizeWindow:fullScreenOptions];

[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
[context setDuration:0.5*duration];
[[window animator] setAlphaValue:1];
} completionHandler:^{
// Do nothing
[self resizeWindowToFitContentSize:[vimView desiredSize] keepOnScreen:YES];
}];
}];

}

- (void)windowWillEnterFullScreen:(NSNotification *)notification
Expand Down Expand Up @@ -1397,7 +1399,7 @@ - (NSTabViewItem *)addNewTabViewItem
}

- (BOOL)askBackendForStarRegister:(NSPasteboard *)pb
{
{
// TODO: Can this be done with evaluateExpression: instead?
BOOL reply = NO;
id backendProxy = [vimController backendProxy];
Expand Down Expand Up @@ -1479,7 +1481,7 @@ - (void)doFindNext:(BOOL)next
input = [NSString stringWithFormat:@"<C-\\><C-N>:let @/='%@'<CR>%c",
query, next ? 'n' : 'N'];
} else {
input = next ? @"<C-\\><C-N>n" : @"<C-\\><C-N>N";
input = next ? @"<C-\\><C-N>n" : @"<C-\\><C-N>N";
}

[vimController addVimInput:input];
Expand Down