Fix full sreen tabline bug

This fixes a bug where showing the tabline in full screen would
sometimes cause the tabline to disappear when leaving full screen.
This commit is contained in:
Bjorn Winckler
2010-07-16 02:42:14 +02:00
parent 7dc2c998ff
commit 2b70f7d985
+6 -3
View File
@@ -453,8 +453,7 @@
NSSize originalSize = [vimView frame].size;
NSSize contentSize = [vimView desiredSize];
if (keepOnScreen)
contentSize = [self constrainContentSizeToScreenSize:contentSize];
contentSize = [self constrainContentSizeToScreenSize:contentSize];
contentSize = [vimView constrainRows:NULL columns:NULL
toSize:contentSize];
[vimView setFrameSize:contentSize];
@@ -569,6 +568,10 @@
// inconsistent states between Vim and MacVim; to avoid this we send a
// synchronous resize message to Vim now (this is not fool-proof, but it
// does seem to work quite well).
// Do NOT send a SetTextDimensionsMsgID message (as opposed to
// LiveResizeMsgID) since then the view is constrained to not be larger
// than the screen the window mostly occupies; this makes it impossible to
// resize the window across multiple screens.
int constrained[2];
NSSize textViewSize = [[vimView textView] frame].size;
@@ -579,7 +582,7 @@
constrained[1], constrained[0]);
NSData *data = [NSData dataWithBytes:constrained length:2*sizeof(int)];
BOOL sendOk = [vimController sendMessageNow:SetTextDimensionsMsgID
BOOL sendOk = [vimController sendMessageNow:LiveResizeMsgID
data:data
timeout:.5];