0
0
mirror of https://github.com/vim/vim.git synced 2025-10-08 06:04:08 -04:00

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)
This commit is contained in:
regomne
2022-09-26 20:48:32 +01:00
committed by Bram Moolenaar
parent 7381c0ce3f
commit 3bdef10dc1
3 changed files with 22 additions and 0 deletions

View File

@@ -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.