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
33c7a4ca
Commit
33c7a4ca
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: adjust indentation after preceding changes
Also, shorten two variable names.
parent
40d34862
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nano.c
+21
-24
src/nano.c
with
21 additions
and
24 deletions
+21
-24
src/nano.c
View file @
33c7a4ca
...
...
@@ -2533,33 +2533,30 @@ int main(int argc, char **argv)
#endif
/* Read the named files on the command line into new buffers. */
{
while
(
optind
<
argc
&&
(
!
openfile
||
ISSET
(
MULTIBUFFER
)))
{
ssize_t
givenline
=
0
,
givencol
=
0
;
/* 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
(
optind
<
argc
-
1
&&
argv
[
optind
][
0
]
==
'+'
)
{
if
(
!
parse_line_column
(
&
argv
[
optind
++
][
1
],
&
givenline
,
&
givencol
))
statusline
(
ALERT
,
_
(
"Invalid line or column number"
));
}
/* If opening fails, don't try to position the cursor. */
if
(
!
open_buffer
(
argv
[
optind
++
],
FALSE
))
continue
;
while
(
optind
<
argc
&&
(
!
openfile
||
ISSET
(
MULTIBUFFER
)))
{
ssize_t
givenline
=
0
,
givencol
=
0
;
/* If there's a +LINE[,COLUMN] argument here, eat it up. */
if
(
optind
<
argc
-
1
&&
argv
[
optind
][
0
]
==
'+'
)
{
if
(
!
parse_line_column
(
&
argv
[
optind
++
][
1
],
&
givenline
,
&
givencol
))
statusline
(
ALERT
,
_
(
"Invalid line or column number"
));
}
/* If opening fails, don't try to position the cursor. */
if
(
!
open_buffer
(
argv
[
optind
++
],
FALSE
))
continue
;
/* If a position was given on the command line, go there. */
if
(
givenline
>
0
||
givencol
>
0
)
do_gotolinecolumn
(
givenline
,
givencol
,
FALSE
,
FALSE
);
/* If a position was given on the command line, go there. */
if
(
givenline
>
0
||
givencol
>
0
)
do_gotolinecolumn
(
givenline
,
givencol
,
FALSE
,
FALSE
);
#ifndef DISABLE_HISTORIES
else
if
(
ISSET
(
POS_HISTORY
))
{
ssize_t
savedposline
,
savedposcol
;
/* If edited before, restore the last cursor position. */
if
(
has_old_position
(
argv
[
optind
-
1
],
&
savedposline
,
&
savedposcol
))
do_gotolinecolumn
(
savedposline
,
savedposcol
,
FALSE
,
FALSE
);
}
#endif
else
if
(
ISSET
(
POS_HISTORY
))
{
ssize_t
savedline
,
savedcol
;
/* If edited before, restore the last cursor position. */
if
(
has_old_position
(
argv
[
optind
-
1
],
&
savedline
,
&
savedcol
))
do_gotolinecolumn
(
savedline
,
savedcol
,
FALSE
,
FALSE
);
}
#endif
}
/* If no filenames were given, or all of them were invalid things like
...
...
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