comparison src/gui_gtk_x11.c @ 30523:5ab992f09df8 v9.0.0597

patch 9.0.0597: cannot close a tab page with the middle mouse button Commit: https://github.com/vim/vim/commit/3bdef10dc1c836e5e5a6fdcc1c21155cbd80d798 Author: regomne <fallingsunz@gmail.com> Date: Mon Sep 26 20:48:32 2022 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Mon, 26 Sep 2022 22:00:04 +0200
parents 029c59bf78f1
children 2cad2913c7c1
comparison
equal deleted inserted replaced
30522:c2b2903782c8 30523:5ab992f09df8
3342 { 3342 {
3343 // Click after all tabs moves to next tab page. When "x" is 3343 // Click after all tabs moves to next tab page. When "x" is
3344 // small guess it's the left button. 3344 // small guess it's the left button.
3345 send_tabline_event(x < 50 ? -1 : 0); 3345 send_tabline_event(x < 50 ? -1 : 0);
3346 } 3346 }
3347 }
3348 else if (bevent->button == 2)
3349 {
3350 if (clicked_page != 0)
3351 // Middle mouse click on tabpage label closes that tab.
3352 send_tabline_menu_event(clicked_page, TABLINE_MENU_CLOSE);
3347 } 3353 }
3348 } 3354 }
3349 3355
3350 // We didn't handle the event. 3356 // We didn't handle the event.
3351 return FALSE; 3357 return FALSE;