Bind middle-click to close tab

Closes #832
This commit is contained in:
TingPing
2014-01-02 18:03:32 -05:00
parent 2bd1c3f99d
commit 537fb85696
2 changed files with 2 additions and 10 deletions

View File

@@ -1605,8 +1605,8 @@ mg_create_tabmenu (session *sess, GdkEventButton *event, chan *ch)
static gboolean
mg_tab_contextmenu_cb (chanview *cv, chan *ch, int tag, gpointer ud, GdkEventButton *event)
{
/* shift-click to close a tab */
if ((event->state & STATE_SHIFT) && event->type == GDK_BUTTON_PRESS)
/* middle-click or shift-click to close a tab */
if ((event->button == 2 || event->state & STATE_SHIFT) && event->type == GDK_BUTTON_PRESS)
{
mg_xbutton_cb (cv, ch, tag, ud);
return FALSE;