commit 77de1bb2a84e0980d23b7fc2dda1480a1093ca21
parent 4e61e266076fbda20cbf268300e7f645669c7062
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 27 Sep 2020 10:36:09 -0400
Revert "gmnlm: p: require whitespace before link number"
This reverts commit 963700d8d6e31aecfc14e12184637f4c3360f6ed.
Let's make the p command consistent with the others and tell users who
want to navigate to a relative URL unambiguosly to use ./page
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gmnlm.c b/src/gmnlm.c
@@ -69,7 +69,7 @@ const char *help_msg =
"The following commands are available:\n\n"
"q\tQuit\n"
"N\tFollow Nth link (where N is a number)\n"
- "p N\tShow URL of Nth link (where N is a number)\n"
+ "p[N]\tShow URL of Nth link (where N is a number)\n"
"b\tBack (in the page history)\n"
"f\tForward (in the page history)\n"
"H\tView all page history\n"
@@ -303,7 +303,7 @@ do_prompts(const char *prompt, struct browser *browser)
goto exit;
}
case 'p':
- if (!isspace(in[1])) break;
+ if (!in[1]) break;
struct link *link = browser->links;
char *endptr;
int linksel = (int)strtol(in+1, &endptr, 10);