diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-11 20:39:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-11 20:39:19 +0100 |
commit | 295471920def98ce84bc96e5d97c16d250c81621 (patch) | |
tree | 7490f90afb9d639216c80a4942629a19510654ab /src/gui.c | |
parent | 30700cd5ffa258f1d684ab6b34bd03e970450dba (diff) |
patch 8.1.0577: tabpage right-click menu never shows "Close tab"v8.1.0577
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.
Diffstat (limited to 'src/gui.c')
-rw-r--r-- | src/gui.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3865,10 +3865,14 @@ send_tabline_menu_event(int tabidx, int event) { char_u string[3]; - /* Don't put events in the input queue now. */ + // Don't put events in the input queue now. if (hold_gui_events) return; + // Cannot close the last tabpage. + if (event == TABLINE_MENU_CLOSE && first_tabpage->tp_next == NULL) + return; + string[0] = CSI; string[1] = KS_TABMENU; string[2] = KE_FILLER; |