Commit 4de0a504 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: reshuffle an if statement

No related merge requests found
Showing with 4 additions and 6 deletions
+4 -6
...@@ -912,11 +912,6 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw ...@@ -912,11 +912,6 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw
* file we inserted. */ * file we inserted. */
openfile->placewewant = xplustabs(); openfile->placewewant = xplustabs();
#ifndef NANO_TINY
if (undoable)
update_undo(INSERT);
#endif
if (!writable) if (!writable)
statusline(ALERT, "File '%s' is unwritable", filename); statusline(ALERT, "File '%s' is unwritable", filename);
#ifndef NANO_TINY #ifndef NANO_TINY
...@@ -936,7 +931,7 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw ...@@ -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)", "Read %lu lines (Converted from DOS format)",
(unsigned long)num_lines), (unsigned long)num_lines); (unsigned long)num_lines), (unsigned long)num_lines);
} }
#endif /* !NANO_TINY */ #endif
else else
statusline(HUSH, P_("Read %lu line", "Read %lu lines", statusline(HUSH, P_("Read %lu line", "Read %lu lines",
(unsigned long)num_lines), (unsigned long)num_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 ...@@ -945,6 +940,9 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw
focusing = FALSE; focusing = FALSE;
#ifndef NANO_TINY #ifndef NANO_TINY
if (undoable)
update_undo(INSERT);
if (ISSET(MAKE_IT_UNIX)) if (ISSET(MAKE_IT_UNIX))
openfile->fmt = NIX_FILE; openfile->fmt = NIX_FILE;
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment