Mercurial > vim
comparison src/gui_gtk_x11.c @ 15134:f2972ff144ab v8.1.0577
patch 8.1.0577: tabpage right-click menu never shows "Close tab"
commit https://github.com/vim/vim/commit/295471920def98ce84bc96e5d97c16d250c81621
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 11 20:39:19 2018 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 11 Dec 2018 20:45:06 +0100 |
parents | 6e4e0d43b20b |
children | 55ccc2d353bd |
comparison
equal
deleted
inserted
replaced
15133:b5c9b7b790cd | 15134:f2972ff144ab |
---|---|
3335 create_tabline_menu(void) | 3335 create_tabline_menu(void) |
3336 { | 3336 { |
3337 GtkWidget *menu; | 3337 GtkWidget *menu; |
3338 | 3338 |
3339 menu = gtk_menu_new(); | 3339 menu = gtk_menu_new(); |
3340 if (first_tabpage->tp_next != NULL) | 3340 add_tabline_menu_item(menu, (char_u *)_("Close tab"), TABLINE_MENU_CLOSE); |
3341 add_tabline_menu_item(menu, (char_u *)_("Close tab"), | |
3342 TABLINE_MENU_CLOSE); | |
3343 add_tabline_menu_item(menu, (char_u *)_("New tab"), TABLINE_MENU_NEW); | 3341 add_tabline_menu_item(menu, (char_u *)_("New tab"), TABLINE_MENU_NEW); |
3344 add_tabline_menu_item(menu, (char_u *)_("Open Tab..."), TABLINE_MENU_OPEN); | 3342 add_tabline_menu_item(menu, (char_u *)_("Open Tab..."), TABLINE_MENU_OPEN); |
3345 | 3343 |
3346 return menu; | 3344 return menu; |
3347 } | 3345 } |