Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
bee67042
Commit
bee67042
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: elide a variable
parent
8dffb00f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nano.c
+5
-7
src/nano.c
with
5 additions
and
7 deletions
+5
-7
src/nano.c
View file @
bee67042
...
...
@@ -2534,19 +2534,17 @@ int main(int argc, char **argv)
/* Read the named files on the command line into new buffers. */
{
int
i
=
optind
;
ssize_t
iline
=
0
,
icol
=
0
;
for
(;
i
<
argc
&&
(
!
openfile
||
ISSET
(
MULTIBUFFER
))
;
i
++
)
{
while
(
optind
<
argc
&&
(
!
openfile
||
ISSET
(
MULTIBUFFER
)))
{
/* 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
]
==
'+'
)
{
if
(
!
parse_line_column
(
&
argv
[
i
][
1
],
&
iline
,
&
icol
))
if
(
optind
<
argc
-
1
&&
argv
[
optind
][
0
]
==
'+'
)
{
if
(
!
parse_line_column
(
&
argv
[
optind
++
][
1
],
&
iline
,
&
icol
))
statusline
(
ALERT
,
_
(
"Invalid line or column number"
));
i
++
;
}
/* If opening fails, don't try to position the cursor. */
if
(
!
open_buffer
(
argv
[
i
],
FALSE
))
if
(
!
open_buffer
(
argv
[
optind
++
],
FALSE
))
continue
;
/* If a position was given on the command line, go there. */
...
...
@@ -2559,7 +2557,7 @@ int main(int argc, char **argv)
else
if
(
ISSET
(
POS_HISTORY
))
{
ssize_t
savedposline
,
savedposcol
;
/* If edited before, restore the last cursor position. */
if
(
has_old_position
(
argv
[
i
],
&
savedposline
,
&
savedposcol
))
if
(
has_old_position
(
argv
[
optind
-
1
],
&
savedposline
,
&
savedposcol
))
do_gotolinecolumn
(
savedposline
,
savedposcol
,
FALSE
,
FALSE
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment