From 46ecc9eff6f237510d6671914a533fa06bdb890e Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 13 Oct 2011 13:57:41 +0200 Subject: mothra: make fragment urls work not only from mouse hit --- sys/src/cmd/mothra/mothra.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/src/cmd/mothra/mothra.c b/sys/src/cmd/mothra/mothra.c index a3cd22088..41bac5e5d 100644 --- a/sys/src/cmd/mothra/mothra.c +++ b/sys/src/cmd/mothra/mothra.c @@ -699,12 +699,7 @@ void docmd(Panel *p, char *s){ } void hiturl(int buttons, char *url, int map){ switch(buttons){ - case 1: - if(*url == '#') - scrollto(url+1); - else - geturl(url, GET, 0, 0, map); - break; + case 1: geturl(url, GET, 0, 0, map); break; case 2: selurl(url); break; case 4: message("Button 3 hit on url can't happen!"); break; } @@ -981,6 +976,11 @@ void geturl(char *urlname, int method, char *body, int plumb, int map){ int pfd[2]; Www *w; + if(*urlname == '#'){ + scrollto(urlname+1); + return; + } + selurl(urlname); selection->map=map; -- cgit v1.2.3