From c10ae3882e8ebba755dc59bc52c659bb18cf0d8a Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Sun, 29 Jul 2007 10:27:18 +0000 Subject: [PATCH] - Tabs no longer uses 'size to fit'. - Added some cautionary comments to certain sendMessage:data:wait: calls. git-svn-id: http://macvim.googlecode.com/svn/trunk@26 96c4425d-ca35-0410-94e5-3396d5c13a8f --- MMWindowController.m | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/MMWindowController.m b/MMWindowController.m index fdfdc23fd4..9d6b3ce309 100644 --- a/MMWindowController.m +++ b/MMWindowController.m @@ -135,7 +135,10 @@ NSMutableArray *buildMenuAddress(NSMenu *menu) // Called after window nib file is loaded. [tabBarControl setHidden:YES]; - [tabBarControl setSizeCellsToFit:YES]; + // NOTE: Size to fit looks good, but not many tabs will fit and there are + // quite a few drawing bugs in this code, so it is disabled for now. + //[tabBarControl setSizeCellsToFit:YES]; + [tabBarControl setCellMinWidth:64]; [tabBarControl setAllowsDragBetweenWindows:NO]; [tabBarControl setShowAddTabButton:YES]; [[tabBarControl addTabButton] setTarget:self]; @@ -384,6 +387,9 @@ NSMutableArray *buildMenuAddress(NSMenu *menu) - (IBAction)addNewTab:(id)sender { + // NOTE! This can get called a lot if the user holds down the key + // equivalent for this action, which causes the ports to fill up. If we + // wait for the message to be sent then the app might become unresponsive. [vimController sendMessage:AddNewTabMsgID data:nil wait:NO]; } @@ -855,6 +861,9 @@ NSMutableArray *buildMenuAddress(NSMenu *menu) [data appendBytes:&hitPart length:sizeof(int)]; [data appendBytes:&value length:sizeof(float)]; + // TODO: Should this message wait or not? If there are problems with + // MacVim locking up when the user scrolls violently, then it should be + // changed to NO. [vimController sendMessage:ScrollbarEventMsgID data:data wait:YES]; } @@ -885,6 +894,10 @@ NSMutableArray *buildMenuAddress(NSMenu *menu) //NSLog(@"Notify Vim that text storage dimensions changed to %dx%d", // dim[0], dim[1]); NSData *data = [NSData dataWithBytes:dim length:2*sizeof(int)]; + + // NOTE! This can get called a lot when in live resize, which causes + // the ports to fill up. If we wait for the message to be sent then + // the app might become unresponsive. [vimController sendMessage:SetTextDimensionsMsgID data:data wait:![textView inLiveResize]]; }