From f36575da68c26104894173db1271c65f821be5de Mon Sep 17 00:00:00 2001 From: ZenWalker Date: Tue, 7 Mar 2017 20:52:06 +0100 Subject: Fix: the tab closes unexpectedly with middle click under line numbers Fixes #215 --- pluma/pluma-view.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c index b73315e6..707656a3 100644 --- a/pluma/pluma-view.c +++ b/pluma/pluma-view.c @@ -1988,13 +1988,16 @@ static gboolean pluma_view_button_press_event (GtkWidget *widget, GdkEventButton *event) { if ((event->type == GDK_BUTTON_PRESS) && - (event->button == 3) && (event->window == gtk_text_view_get_window (GTK_TEXT_VIEW (widget), GTK_TEXT_WINDOW_LEFT))) { - show_line_numbers_menu (widget, event); - - return TRUE; + if (event->button == 3) + { + show_line_numbers_menu (widget, event); + return TRUE; + } + else if (event->button == 2) + return TRUE; } return GTK_WIDGET_CLASS (pluma_view_parent_class)->button_press_event (widget, event); -- cgit v1.2.1