summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-10-13 13:57:41 +0200
committercinap_lenrek <cinap_lenrek@centraldogma>2011-10-13 13:57:41 +0200
commit46ecc9eff6f237510d6671914a533fa06bdb890e (patch)
treebd324bd999de3c67e8c8ef0e75aae37a741fd1ae
parentc92ddf3fb5efe2e37ac9e3b1a1129f82de1bf837 (diff)
downloadplan9front-46ecc9eff6f237510d6671914a533fa06bdb890e.tar.xz
mothra: make fragment urls work not only from mouse hit
-rw-r--r--sys/src/cmd/mothra/mothra.c12
1 files 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;