aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormutantturkey <mutantturke@gmail.com>2012-08-29 12:52:43 -0400
committermutantturkey <mutantturke@gmail.com>2012-08-29 12:52:43 -0400
commit433597f738c33a025c477f08dc4f94ecff31d63e (patch)
tree2eab0554fab97d6a94038ac8643c8b29482ca3bc
parent2eb70ceccc5f8639bbf4cc50af7e5dac9d42a894 (diff)
fix handling to return true only if we get a match. thanks Wouter Van Rooy
-rw-r--r--svte.c13
1 files changed, 7 insertions, 6 deletions
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;
}