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
f6e83438
Commit
f6e83438
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: elide a comment, and improve a couple of others
parent
169da094
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
+8
-11
src/files.c
with
8 additions
and
11 deletions
+8
-11
src/files.c
View file @
f6e83438
...
...
@@ -931,13 +931,10 @@ int open_file(const char *filename, bool newfie, bool quiet, FILE **f)
{
struct
stat
fileinfo
,
fileinfo2
;
int
fd
;
char
*
full_filename
;
/* Get the specified file's full path. */
full_filename
=
get_full_path
(
filename
);
char
*
full_filename
=
get_full_path
(
filename
);
/*
Okay, if we can't stat the path
due to
a
component's
*
permissions, just try the relative
one. */
/*
If the full path is unusable (
due to
some
component's
permissions),
*
but the relative path is okay, then just use that
one. */
if
(
full_filename
==
NULL
||
(
stat
(
full_filename
,
&
fileinfo
)
==
-
1
&&
stat
(
filename
,
&
fileinfo2
)
!=
-
1
))
full_filename
=
mallocstrcpy
(
full_filename
,
filename
);
...
...
@@ -1168,18 +1165,18 @@ void do_insertfile(void)
if
(
has_old_position
(
answer
,
&
priorline
,
&
priorcol
))
do_gotolinecolumn
(
priorline
,
priorcol
,
FALSE
,
FALSE
);
}
#endif
/* ENABLE_HISTORIES */
/* Update
stuff to account for the current
buffer. */
#endif
/* Update
title bar and color info for this new
buffer. */
prepare_for_display
();
}
else
#endif
/* ENABLE_MULTIBUFFER */
{
/*
Mark
the file a
s modified if it chang
ed. */
/*
If
the file a
ctually changed, mark it as modifi
ed. */
if
(
openfile
->
current
->
lineno
!=
was_current_lineno
||
openfile
->
current_x
!=
was_current_x
)
openfile
->
current_x
!=
was_current_x
)
set_modified
();
#ifndef NANO_TINY
/*
Don't change the format of the current file
. */
/*
Ensure that the buffer retains the format that it had
. */
openfile
->
fmt
=
original_fmt
;
#endif
refresh_needed
=
TRUE
;
...
...
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