diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui_gtk_x11.c | 4 | ||||
-rw-r--r-- | src/gui_mac.c | 3 | ||||
-rw-r--r-- | src/gui_motif.c | 19 | ||||
-rw-r--r-- | src/gui_w48.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
5 files changed, 21 insertions, 11 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 97ad6b0689..5538446056 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -2873,7 +2873,9 @@ create_tabline_menu(void) GtkWidget *menu; menu = gtk_menu_new(); - add_tabline_menu_item(menu, (char_u *)_("Close"), TABLINE_MENU_CLOSE); + if (first_tabpage->tp_next != NULL) + add_tabline_menu_item(menu, (char_u *)_("Close tab"), + TABLINE_MENU_CLOSE); add_tabline_menu_item(menu, (char_u *)_("New tab"), TABLINE_MENU_NEW); add_tabline_menu_item(menu, (char_u *)_("Open Tab..."), TABLINE_MENU_OPEN); diff --git a/src/gui_mac.c b/src/gui_mac.c index 54087c518b..3479dbb55c 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -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); diff --git a/src/gui_motif.c b/src/gui_motif.c index 57f264df95..eb8c3255b9 100644 --- a/src/gui_motif.c +++ b/src/gui_motif.c @@ -540,14 +540,17 @@ gui_x11_create_widgets() tabLine_menu = XmCreatePopupMenu(tabLine, "tabline popup", NULL, 0); /* Add the buttons to the menu */ - n = 0; - XtSetArg(args[n], XmNuserData, TABLINE_MENU_CLOSE); n++; - xms = XmStringCreate((char *)"Close tab", STRING_TAG); - XtSetArg(args[n], XmNlabelString, xms); n++; - button = XmCreatePushButton(tabLine_menu, "Close", args, n); - XtAddCallback(button, XmNactivateCallback, - (XtCallbackProc)tabline_button_cb, NULL); - XmStringFree(xms); + if (first_tabpage->tp_next != NULL) + { + n = 0; + XtSetArg(args[n], XmNuserData, TABLINE_MENU_CLOSE); n++; + xms = XmStringCreate((char *)"Close tab", STRING_TAG); + XtSetArg(args[n], XmNlabelString, xms); n++; + button = XmCreatePushButton(tabLine_menu, "Close", args, n); + XtAddCallback(button, XmNactivateCallback, + (XtCallbackProc)tabline_button_cb, NULL); + XmStringFree(xms); + } n = 0; XtSetArg(args[n], XmNuserData, TABLINE_MENU_NEW); n++; diff --git a/src/gui_w48.c b/src/gui_w48.c index cd7fdde549..1096ec8452 100644 --- 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...")); diff --git a/src/version.c b/src/version.c index 6b8b15e8ee..680e551fb7 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 731, +/**/ 730, /**/ 729, |