Mercurial > vim
diff src/gui_w48.c @ 6819:5f24d6d51333 v7.4.731
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 09 Jun 2015 19:14:24 +0200 |
parents | 121613e72e39 |
children | fa95595fbc52 |
line wrap: on
line diff
--- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -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..."));