1
0
forked from aniani/vim

patch 7.4.731

Problem:    The tab menu shows "Close tab" even when it doesn't work.
Solution:   Don't show "Close tab" for the last tab. (John Marriott)
This commit is contained in:
Bram Moolenaar
2015-06-09 19:14:24 +02:00
parent bc56336bb4
commit 7098ee5c37
5 changed files with 21 additions and 11 deletions

View File

@@ -6819,7 +6819,8 @@ initialise_tabline(void)
// create tabline popup menu required by vim docs (see :he tabline-menu)
CreateNewMenu(kTabContextMenuId, 0, &contextMenu);
AppendMenuItemTextWithCFString(contextMenu, CFSTR("Close"), 0,
if (first_tabpage->tp_next != NULL)
AppendMenuItemTextWithCFString(contextMenu, CFSTR("Close Tab"), 0,
TABLINE_MENU_CLOSE, NULL);
AppendMenuItemTextWithCFString(contextMenu, CFSTR("New Tab"), 0,
TABLINE_MENU_NEW, NULL);