mirror of
git://git.sv.gnu.org/nano.git
synced 2025-02-15 12:54:14 +03:00
startup: allow using a bare "+" to mean put-cursor-on-last-line
Editors like 'vim' and 'ne' and 'uemacs' know this shorthand too. This fulfills https://savannah.gnu.org/bugs/?60663.
This commit is contained in:
parent
8797ada815
commit
405c2162b5
@ -2403,7 +2403,11 @@ int main(int argc, char **argv)
|
||||
optind++;
|
||||
} else
|
||||
#endif
|
||||
if (!parse_line_column(&argv[optind++][1], &givenline, &givencol))
|
||||
/* When there is nothing after the "+", understand it as go-to-EOF,
|
||||
* otherwise parse and store the given number(s).*/
|
||||
if (argv[optind++][1] == '\0')
|
||||
givenline = -1;
|
||||
else if (!parse_line_column(&argv[optind - 1][1], &givenline, &givencol))
|
||||
statusline(ALERT, _("Invalid line or column number"));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user