Fix left-click of URL/HOST by tidying what we pass to fe_open_url()

This commit is contained in:
RichardHitt 2013-04-24 13:18:34 -07:00
parent fc659a67f0
commit ee200b97aa

View File

@ -2233,7 +2233,7 @@ static void
mg_word_clicked (GtkWidget *xtext, char *word, GdkEventButton *even) mg_word_clicked (GtkWidget *xtext, char *word, GdkEventButton *even)
{ {
session *sess = current_sess; session *sess = current_sess;
int word_type, start, end; int word_type = 0, start, end;
char *tmp; char *tmp;
if (word) if (word)
@ -2256,7 +2256,8 @@ mg_word_clicked (GtkWidget *xtext, char *word, GdkEventButton *even)
{ {
case WORD_URL: case WORD_URL:
case WORD_HOST: case WORD_HOST:
fe_open_url (word); word[end] = 0;
fe_open_url (word + start);
} }
} }
return; return;