diff options
author | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-09-24 08:52:45 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-09-24 08:52:45 +0200 |
commit | 072680b9c555ec03225e25b22bbdc9aa731f1a8f (patch) | |
tree | 5ff31f012870ab09bb237964dfe2866d2a3e45b2 /sys/src | |
parent | 02287a23f0e71b1d524c853adc0ea24671522da2 (diff) |
merge
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/cmd/mothra/mothra.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/src/cmd/mothra/mothra.c b/sys/src/cmd/mothra/mothra.c index 6d1f01558..fc9c7c40f 100644 --- a/sys/src/cmd/mothra/mothra.c +++ b/sys/src/cmd/mothra/mothra.c @@ -540,11 +540,11 @@ void docmd(Panel *p, char *s){ else geturl(s, GET, 0, 1, 0); break; case 'j': - s=arg(s); - if(atoi(s) <= nwww()) - geturl(www(atoi(s)-1)->url->fullname, GET, 0, 0, 0); + s = arg(s); + if(*s) + doprev(nil, 1, wwwtop-atoi(s)); else - message("no url selected"); + message("Usgae: j index"); break; case 'r': s = arg(s); @@ -601,7 +601,7 @@ void hiturl(int buttons, char *url, int map){ void doprev(Panel *p, int buttons, int index){ int i; USED(p); - if(index >= nwww()) + if(index < 0 || index >= nwww()) return; i = wwwtop-index-1; switch(buttons){ |