Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
9026e04c
Commit
9026e04c
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
startup: don't use position history when reading from standard input
parent
92befae9
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
+3
-1
src/nano.c
with
3 additions
and
1 deletion
+3
-1
src/nano.c
View file @
9026e04c
...
...
@@ -2534,6 +2534,7 @@ int main(int argc, char **argv)
/* Read the files mentioned on the command line into new buffers. */
while
(
optind
<
argc
&&
(
!
openfile
||
ISSET
(
MULTIBUFFER
)))
{
ssize_t
givenline
=
0
,
givencol
=
0
;
bool
dash
=
FALSE
;
/* If there's a +LINE[,COLUMN] argument here, eat it up. */
if
(
optind
<
argc
-
1
&&
argv
[
optind
][
0
]
==
'+'
)
{
...
...
@@ -2546,6 +2547,7 @@ int main(int argc, char **argv)
if
(
strcmp
(
argv
[
optind
],
"-"
)
==
0
)
{
if
(
!
scoop_stdin
())
continue
;
dash
=
TRUE
;
optind
++
;
}
else
if
(
!
open_buffer
(
argv
[
optind
++
],
FALSE
))
continue
;
...
...
@@ -2554,7 +2556,7 @@ int main(int argc, char **argv)
if
(
givenline
!=
0
||
givencol
!=
0
)
do_gotolinecolumn
(
givenline
,
givencol
,
FALSE
,
FALSE
);
#ifndef DISABLE_HISTORIES
else
if
(
ISSET
(
POS_HISTORY
))
{
else
if
(
ISSET
(
POS_HISTORY
)
&&
!
dash
)
{
ssize_t
savedline
,
savedcol
;
/* If edited before, restore the last cursor position. */
if
(
has_old_position
(
argv
[
optind
-
1
],
&
savedline
,
&
savedcol
))
...
...
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
Menu
Projects
Groups
Snippets
Help