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

@@ -2389,7 +2389,9 @@ show_tabline_popup_menu(void)
if (tab_pmenu == NULL)
return;
add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_CLOSE, _("Close tab"));
if (first_tabpage->tp_next != NULL)
add_tabline_popup_menu_entry(tab_pmenu,
TABLINE_MENU_CLOSE, _("Close tab"));
add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_NEW, _("New tab"));
add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_OPEN,
_("Open tab..."));