diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2011-09-23 22:54:03 -0500 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2011-09-23 22:54:03 -0500 |
commit | 93ea257aa3487ed5cbfff14cf281a9850cc688dc (patch) | |
tree | ab7f54b54283569fdfd75235ce158ccb3bcd7b29 /sys/src | |
parent | 126290e42356a733d15c8c2ed224a31a25f8b564 (diff) |
mothra: add keyboard command j to jump to page from the list of previously viewed pages
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/cmd/mothra/mothra.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/src/cmd/mothra/mothra.c b/sys/src/cmd/mothra/mothra.c index ea9db9155..92f4f0ef4 100644 --- a/sys/src/cmd/mothra/mothra.c +++ b/sys/src/cmd/mothra/mothra.c @@ -3,6 +3,7 @@ */ #include <u.h> #include <libc.h> +#include <ctype.h> #include <draw.h> #include <event.h> #include <keyboard.h> @@ -539,6 +540,13 @@ void docmd(Panel *p, char *s){ } else geturl(s, GET, 0, 1, 0); break; + case 'j': + s=arg(s); + if(isdigit(s)) + geturl(www(atoi(s)-1)->url->fullname, GET, 0, 0, 0); + else + message("no url selected"); + break; case 'r': s = arg(s); if(*s == '\0' && selection) |