tweaks: reshuffle a condition, to make a little more sense
parent
2dd97a0352
commit
b18f1265ff
|
@ -751,8 +751,8 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable)
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
if (fd > 0 && !undoable)
|
if (fd > 0 && !undoable && !ISSET(VIEW_MODE))
|
||||||
writable = (ISSET(VIEW_MODE) || access(filename, W_OK) == 0);
|
writable = (access(filename, W_OK) == 0);
|
||||||
|
|
||||||
/* If the file ended with newline, or it was entirely empty, make the
|
/* If the file ended with newline, or it was entirely empty, make the
|
||||||
* last line blank. Otherwise, put the last read data in. */
|
* last line blank. Otherwise, put the last read data in. */
|
||||||
|
|
Loading…
Reference in New Issue