nano

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

commit 4de0a5049b59887e988b8d2ae70da2065a47daa6
parent dc76e84657d8e61603cd54dae57bb10db75d1ffc
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sun, 11 Sep 2016 21:43:47 +0200

tweaks: reshuffle an if statement

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

diff --git a/src/files.c b/src/files.c @@ -912,11 +912,6 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw * file we inserted. */ openfile->placewewant = xplustabs(); -#ifndef NANO_TINY - if (undoable) - update_undo(INSERT); -#endif - if (!writable) statusline(ALERT, "File '%s' is unwritable", filename); #ifndef NANO_TINY @@ -936,7 +931,7 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw "Read %lu lines (Converted from DOS format)", (unsigned long)num_lines), (unsigned long)num_lines); } -#endif /* !NANO_TINY */ +#endif else statusline(HUSH, P_("Read %lu line", "Read %lu lines", (unsigned long)num_lines), (unsigned long)num_lines); @@ -945,6 +940,9 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw focusing = FALSE; #ifndef NANO_TINY + if (undoable) + update_undo(INSERT); + if (ISSET(MAKE_IT_UNIX)) openfile->fmt = NIX_FILE; #endif