diff --git a/runtime/doc/gui_mac.txt b/runtime/doc/gui_mac.txt index 429e7d47ce..2d450f2018 100644 --- a/runtime/doc/gui_mac.txt +++ b/runtime/doc/gui_mac.txt @@ -1,4 +1,4 @@ -*gui_mac.txt* For Vim version 7.2. Last change: 2008 Oct 25 +*gui_mac.txt* For Vim version 7.2. Last change: 2009 Jan 04 VIM REFERENCE MANUAL by Bjorn Winckler @@ -263,6 +263,7 @@ MMDialogsTrackPwd open/save dialogs track the Vim pwd [bool] MMLoginShellArgument login shell parameter [string] MMLoginShellCommand which shell to use to launch Vim [string] MMNoFontSubstitution disable automatic font substitution [bool] +MMShowAddTabButton enable "add tab" button on tabline [bool] MMTabMaxWidth maximum width of a tab [int] MMTabMinWidth minimum width of a tab [int] MMTabOptimumWidth default width of a tab [int] diff --git a/src/MacVim/MMAppController.m b/src/MacVim/MMAppController.m index e943741b1d..93fe8a4842 100644 --- a/src/MacVim/MMAppController.m +++ b/src/MacVim/MMAppController.m @@ -162,6 +162,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef, [NSNumber numberWithInt:64], MMTabMinWidthKey, [NSNumber numberWithInt:6*64], MMTabMaxWidthKey, [NSNumber numberWithInt:132], MMTabOptimumWidthKey, + [NSNumber numberWithBool:YES], MMShowAddTabButtonKey, [NSNumber numberWithInt:2], MMTextInsetLeftKey, [NSNumber numberWithInt:1], MMTextInsetRightKey, [NSNumber numberWithInt:1], MMTextInsetTopKey, diff --git a/src/MacVim/MMVimView.m b/src/MacVim/MMVimView.m index 97a2aace64..d371f5e2fc 100644 --- a/src/MacVim/MMVimView.m +++ b/src/MacVim/MMVimView.m @@ -88,7 +88,8 @@ enum { // frameSizeMayHaveChanged. [self setAutoresizesSubviews:YES]; - if ([[NSUserDefaults standardUserDefaults] boolForKey:MMAtsuiRendererKey]) { + NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; + if ([ud boolForKey:MMAtsuiRendererKey]) { // Use ATSUI for text rendering. // // HACK! 'textView' has type MMTextView, but MMAtsuiTextView is not @@ -100,7 +101,6 @@ enum { } // Allow control of text view inset via MMTextInset* user defaults. - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; int left = [ud integerForKey:MMTextInsetLeftKey]; int top = [ud integerForKey:MMTextInsetTopKey]; [textView setTextContainerInset:NSMakeSize(left, top)]; @@ -129,7 +129,7 @@ enum { [tabBarControl setCellOptimumWidth: [ud integerForKey:MMTabOptimumWidthKey]]; - [tabBarControl setShowAddTabButton:YES]; + [tabBarControl setShowAddTabButton:[ud boolForKey:MMShowAddTabButtonKey]]; [[tabBarControl addTabButton] setTarget:self]; [[tabBarControl addTabButton] setAction:@selector(addNewTab:)]; [tabBarControl setAllowsDragBetweenWindows:NO]; diff --git a/src/MacVim/Miscellaneous.h b/src/MacVim/Miscellaneous.h index 23c3ebe206..b92d9308c8 100644 --- a/src/MacVim/Miscellaneous.h +++ b/src/MacVim/Miscellaneous.h @@ -26,6 +26,7 @@ extern NSString *MMTabMinWidthKey; extern NSString *MMTabMaxWidthKey; extern NSString *MMTabOptimumWidthKey; +extern NSString *MMShowAddTabButtonKey; extern NSString *MMTextInsetLeftKey; extern NSString *MMTextInsetRightKey; extern NSString *MMTextInsetTopKey; diff --git a/src/MacVim/Miscellaneous.m b/src/MacVim/Miscellaneous.m index 15259d48d7..a26259fc0e 100644 --- a/src/MacVim/Miscellaneous.m +++ b/src/MacVim/Miscellaneous.m @@ -17,6 +17,7 @@ NSString *MMTabMinWidthKey = @"MMTabMinWidth"; NSString *MMTabMaxWidthKey = @"MMTabMaxWidth"; NSString *MMTabOptimumWidthKey = @"MMTabOptimumWidth"; +NSString *MMShowAddTabButtonKey = @"MMShowAddTabButton"; NSString *MMTextInsetLeftKey = @"MMTextInsetLeft"; NSString *MMTextInsetRightKey = @"MMTextInsetRight"; NSString *MMTextInsetTopKey = @"MMTextInsetTop";