1
0
mirror of https://git.sr.ht/~sircmpwn/gmni synced 2024-11-23 04:51:59 +01:00

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
This commit is contained in:
Drew DeVault 2020-09-27 10:36:09 -04:00
parent 4e61e26607
commit 77de1bb2a8

@ -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);