From 9dc544acbdda92008a8ad89fa5177554225d8785 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 19 Jul 2015 09:01:59 +0000 Subject: [PATCH] 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 --- ChangeLog | 4 ++++ src/nano.c | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76bb0a66..d74d8428 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-07-19 Benno Schulenberg + * 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 * 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 diff --git a/src/nano.c b/src/nano.c index 80d83edf..9e2c6610 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2713,8 +2713,7 @@ int main(int argc, char **argv) /* If there's a +LINE or +LINE,COLUMN flag here, it is * followed by at least one other argument, the filename it * applies to. */ - if (i < argc - 1 && argv[i][0] == '+' && iline == 1 && - icol == 1) + if (i < argc - 1 && argv[i][0] == '+') parse_line_column(&argv[i][1], &iline, &icol); else { open_buffer(argv[i], FALSE); @@ -2722,8 +2721,8 @@ int main(int argc, char **argv) if (iline > 0 || icol > 0) { do_gotolinecolumn(iline, icol, FALSE, FALSE, FALSE, FALSE); - iline = 1; - icol = 1; + iline = 0; + icol = 0; } #ifndef DISABLE_HISTORIES else { -- 2.39.5