0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05:00

patch 8.1.0577: tabpage right-click menu never shows "Close tab"

Problem:    Tabpage right-click menu never shows "Close tab".
Solution:   Always create the "Close tab" item but ignore the event if there
            is only one tab.
This commit is contained in:
Bram Moolenaar
2018-12-11 20:39:19 +01:00
parent 30700cd5ff
commit 295471920d
5 changed files with 19 additions and 19 deletions

View File

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