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

Disable macOS native tabs (introduced in 10.12) #788

Merged
merged 1 commit into from
Nov 24, 2018
Merged
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
14 changes: 14 additions & 0 deletions src/MacVim/MMAppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,20 @@ + (void)initialize
CFSTR(""),
kCFPreferencesCurrentApplication);

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

int tabMinWidthKey;
int tabMaxWidthKey;
int tabOptimumWidthKey;
Expand Down