comparison src/gui.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 f17110dae9de
children 5e7515dbf871
comparison
equal deleted inserted replaced
15133:b5c9b7b790cd 15134:f2972ff144ab
3863 void 3863 void
3864 send_tabline_menu_event(int tabidx, int event) 3864 send_tabline_menu_event(int tabidx, int event)
3865 { 3865 {
3866 char_u string[3]; 3866 char_u string[3];
3867 3867
3868 /* Don't put events in the input queue now. */ 3868 // Don't put events in the input queue now.
3869 if (hold_gui_events) 3869 if (hold_gui_events)
3870 return;
3871
3872 // Cannot close the last tabpage.
3873 if (event == TABLINE_MENU_CLOSE && first_tabpage->tp_next == NULL)
3870 return; 3874 return;
3871 3875
3872 string[0] = CSI; 3876 string[0] = CSI;
3873 string[1] = KS_TABMENU; 3877 string[1] = KS_TABMENU;
3874 string[2] = KE_FILLER; 3878 string[2] = KE_FILLER;