diff --git a/src/files.c b/src/files.c index e91b8367..b6fc9822 100644 --- a/src/files.c +++ b/src/files.c @@ -1983,7 +1983,7 @@ bool write_file(const char *name, FILE *thefile, bool normal, } /* When having written an entire buffer, update some administrivia. */ - if (annotate && method == OVERWRITE && normal) { + if (annotate && method == OVERWRITE) { /* If the filename was changed, write a new lockfile when needed, * and check whether it means a different syntax gets used. */ if (strcmp(openfile->filename, realname) != 0) { @@ -2030,7 +2030,7 @@ bool write_file(const char *name, FILE *thefile, bool normal, } #ifndef NANO_TINY - if (ISSET(MINIBAR) && LINES > 1 && annotate && normal) + if (ISSET(MINIBAR) && LINES > 1 && annotate) report_size = TRUE; else #endif @@ -2302,7 +2302,7 @@ int do_writeout(bool exiting, bool withprompt) free(given); if (choice == 1) return write_file(openfile->filename, NULL, - TRUE, OVERWRITE, TRUE); + TRUE, OVERWRITE, FALSE); else if (choice == 0) return 2; else diff --git a/src/text.c b/src/text.c index 5983cb60..1a892eed 100644 --- a/src/text.c +++ b/src/text.c @@ -2502,7 +2502,7 @@ void do_spell(void) okay = write_marked_file(temp_name, stream, FALSE, OVERWRITE); else #endif - okay = write_file(temp_name, stream, FALSE, OVERWRITE, TRUE); + okay = write_file(temp_name, stream, FALSE, OVERWRITE, FALSE); if (!okay) { statusline(ALERT, _("Error writing temp file: %s"), strerror(errno)); @@ -2903,7 +2903,7 @@ void do_formatter(void) temp_name = safe_tempfile(&stream); if (temp_name != NULL) - okay = write_file(temp_name, stream, FALSE, OVERWRITE, TRUE); + okay = write_file(temp_name, stream, FALSE, OVERWRITE, FALSE); if (!okay) { statusline(ALERT, _("Error writing temp file: %s"), strerror(errno));