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
62491880
Commit
62491880
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: bundle some settings for a new buffer
parent
8b8c6bb8
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/files.c
+3
-7
src/files.c
with
3 additions
and
7 deletions
+3
-7
src/files.c
View file @
62491880
...
...
@@ -475,11 +475,6 @@ bool open_buffer(const char *filename, bool undoable)
rc
=
(
filename
[
0
]
!=
'\0'
&&
!
ISSET
(
NOREAD_MODE
))
?
open_file
(
realname
,
new_buffer
,
inhelp
,
&
f
)
:
-
2
;
/* If we have a file, and we're loading into a new buffer, update
* the filename. */
if
(
rc
!=
-
1
&&
new_buffer
)
openfile
->
filename
=
mallocstrcpy
(
openfile
->
filename
,
realname
);
/* If we have a non-new file, read it in. Then, if the buffer has
* no stat, update the stat, if applicable. */
if
(
rc
>
0
)
{
...
...
@@ -490,9 +485,10 @@ bool open_buffer(const char *filename, bool undoable)
#endif
}
/* If we have a file, and we'
r
e load
ing
into a new buffer,
move back
* t
o the beginning of the first line
of the buffer. */
/* If we have a file, and we'
v
e load
ed it
into a new buffer,
set
* t
he filename and put the cursor at the start
of the buffer. */
if
(
rc
!=
-
1
&&
new_buffer
)
{
openfile
->
filename
=
mallocstrcpy
(
openfile
->
filename
,
realname
);
openfile
->
current
=
openfile
->
fileage
;
openfile
->
current_x
=
0
;
openfile
->
placewewant
=
0
;
...
...
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