We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7fad5c commit eb6668fCopy full SHA for eb6668f
1 file changed
src/MacVim/MMVimView.m
@@ -396,7 +396,10 @@ - (NSTabViewItem *)addNewTabViewItem
396
// which tab should be selected at all times. However, the AppKit will
397
// automatically select the first tab added to a tab view.
398
399
- NSTabViewItem *tvi = [[NSTabViewItem alloc] initWithIdentifier:nil];
+ // The documentation claims initWithIdentifier can be given a nil identifier, but the API itself
400
+ // is decorated such that doing so produces a warning, so the tab count is used as identifier.
401
+ NSInteger identifier = [[self tabView] numberOfTabViewItems];
402
+ NSTabViewItem *tvi = [[NSTabViewItem alloc] initWithIdentifier:[NSNumber numberWithInt:identifier]];
403
404
// NOTE: If this is the first tab it will be automatically selected.
405
vimTaskSelectedTab = YES;
0 commit comments