summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorRichardHitt <rbh00@netcom.com>2013-04-24 13:18:34 -0700
committerRichardHitt <rbh00@netcom.com>2013-04-24 13:18:34 -0700
commitee200b97aae343e9f756a03055f7cd4618d46679 (patch)
treed972c9b2603f484267df741bdcb870debf0d9833
parentfc659a67f06b2beae79603c89ca83c6314dfda63 (diff)
Fix left-click of URL/HOST by tidying what we pass to fe_open_url()
-rw-r--r--src/fe-gtk/maingui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index fb225f47..edc47fce 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -2233,7 +2233,7 @@ static void
 mg_word_clicked (GtkWidget *xtext, char *word, GdkEventButton *even)
 {
 	session *sess = current_sess;
-	int word_type, start, end;
+	int word_type = 0, start, end;
 	char *tmp;
 
 	if (word)
@@ -2256,7 +2256,8 @@ mg_word_clicked (GtkWidget *xtext, char *word, GdkEventButton *even)
 			{
 			case WORD_URL:
 			case WORD_HOST:
-				fe_open_url (word);
+				word[end] = 0;
+				fe_open_url (word + start);
 			}
 		}
 		return;