nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit b18f1265ff451a888a5ae585964b451107c4aab2
parent 2dd97a0352c4584b001fe7d8c8d64448994acea5
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 11 May 2020 19:40:17 +0200

tweaks: reshuffle a condition, to make a little more sense

Diffstat:
Msrc/files.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/files.c b/src/files.c @@ -751,8 +751,8 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable) fclose(f); - if (fd > 0 && !undoable) - writable = (ISSET(VIEW_MODE) || access(filename, W_OK) == 0); + if (fd > 0 && !undoable && !ISSET(VIEW_MODE)) + writable = (access(filename, W_OK) == 0); /* If the file ended with newline, or it was entirely empty, make the * last line blank. Otherwise, put the last read data in. */