Accepting again a +LINE argument for each file given on the command line,

instead of only for the first.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5311 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2015-07-19 09:01:59 +00:00
parent 59fdd4db7a
commit 9dc544acbd
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2015-07-19 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (main): Accept again a +LINE argument for each file
given on the command line. This fixes Savannah bug #45576.
2015-07-18 Benno Schulenberg <bensberg@justemail.net> 2015-07-18 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (edit_draw): When looking for multiline-regex matches, * src/winio.c (edit_draw): When looking for multiline-regex matches,
look for a new start only after an end, instead of right after the look for a new start only after an end, instead of right after the

View File

@ -2713,8 +2713,7 @@ int main(int argc, char **argv)
/* If there's a +LINE or +LINE,COLUMN flag here, it is /* If there's a +LINE or +LINE,COLUMN flag here, it is
* followed by at least one other argument, the filename it * followed by at least one other argument, the filename it
* applies to. */ * applies to. */
if (i < argc - 1 && argv[i][0] == '+' && iline == 1 && if (i < argc - 1 && argv[i][0] == '+')
icol == 1)
parse_line_column(&argv[i][1], &iline, &icol); parse_line_column(&argv[i][1], &iline, &icol);
else { else {
open_buffer(argv[i], FALSE); open_buffer(argv[i], FALSE);
@ -2722,8 +2721,8 @@ int main(int argc, char **argv)
if (iline > 0 || icol > 0) { if (iline > 0 || icol > 0) {
do_gotolinecolumn(iline, icol, FALSE, FALSE, FALSE, do_gotolinecolumn(iline, icol, FALSE, FALSE, FALSE,
FALSE); FALSE);
iline = 1; iline = 0;
icol = 1; icol = 0;
} }
#ifndef DISABLE_HISTORIES #ifndef DISABLE_HISTORIES
else { else {