summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui.c b/src/gui.c
index 2f3bafc97d..9160848c8e 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -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;