patch 9.0.0597: cannot close a tab page with the middle mouse button
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)
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 3cdf222..945cb09 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3345,6 +3345,12 @@
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.