summaryrefslogtreecommitdiffstats
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
authorregomne <fallingsunz@gmail.com>2022-09-26 20:48:32 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-26 20:48:32 +0100
commit3bdef10dc1c836e5e5a6fdcc1c21155cbd80d798 (patch)
tree4d6024d828f95196c03015c809673440c0c0a123 /src/gui_gtk_x11.c
parent7381c0ce3f3e79ec5a74b9be8fc34e0c8181463b (diff)
patch 9.0.0597: cannot close a tab page with the middle mouse buttonv9.0.0597
Problem: Cannot close a tab page with the middle mouse button. Solution: Support closing a tab page with the middle mouse button, like many other programs. (closes #10746)
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 3cdf22260a..945cb09ca9 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3345,6 +3345,12 @@ on_tabline_menu(GtkWidget *widget, GdkEvent *event)
send_tabline_event(x < 50 ? -1 : 0);
}
}
+ else if (bevent->button == 2)
+ {
+ if (clicked_page != 0)
+ // Middle mouse click on tabpage label closes that tab.
+ send_tabline_menu_event(clicked_page, TABLINE_MENU_CLOSE);
+ }
}
// We didn't handle the event.