Skip to content

Commit e5d1176

Browse files
authored
Merge pull request macvim-dev#788 from ychin/disable_native_tabs
Disable macOS native tabs (introduced in 10.12)
2 parents 8e5b2b5 + 1a0d503 commit e5d1176

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/MacVim/MMAppController.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,20 @@ + (void)initialize
182182
CFSTR(""),
183183
kCFPreferencesCurrentApplication);
184184

185+
if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)]) {
186+
// Disable automatic tabbing on 10.12+. MacVim already has its own
187+
// tabbing interface, so we don't want multiple hierarchy of tabs mixing
188+
// native and Vim tabs. MacVim also doesn't work well with native tabs
189+
// right now since it doesn't respond well to the size change, and it
190+
// doesn't show the native menu items (e.g. move tab to new window) in
191+
// all the tabs.
192+
//
193+
// Note: MacVim cannot use macOS native tabs for Vim tabs because Vim
194+
// assumes only one tab can be shown at a time, and it would be hard to
195+
// handle native tab's "move tab to a new window" functionality.
196+
[NSWindow setAllowsAutomaticWindowTabbing:NO];
197+
}
198+
185199
int tabMinWidthKey;
186200
int tabMaxWidthKey;
187201
int tabOptimumWidthKey;

0 commit comments

Comments
 (0)