From 433597f738c33a025c477f08dc4f94ecff31d63e Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Wed, 29 Aug 2012 12:52:43 -0400 Subject: fix handling to return true only if we get a match. thanks Wouter Van Rooy --- svte.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'svte.c') diff --git a/svte.c b/svte.c index 10bb28a..45c4b67 100644 --- a/svte.c +++ b/svte.c @@ -177,12 +177,13 @@ gboolean event_button(GtkWidget *widget, GdkEventButton *button_event, struct te if(button_event->button == 1) { match = vte_terminal_match_check(VTE_TERMINAL(t->vte), - button_event->x / vte_terminal_get_char_width (VTE_TERMINAL (t->vte)), - button_event->y / vte_terminal_get_char_height (VTE_TERMINAL (t->vte)), - &ret); - launch_url(match); - return TRUE; - + button_event->x / vte_terminal_get_char_width (VTE_TERMINAL (t->vte)), + button_event->y / vte_terminal_get_char_height (VTE_TERMINAL (t->vte)), + &ret); + if (match) { + launch_url(match); + return TRUE; + } } return FALSE; } -- cgit v1.2.3