diff --git a/src/files.c b/src/files.c index 9445b51a..4408c053 100644 --- a/src/files.c +++ b/src/files.c @@ -540,7 +540,7 @@ void replace_buffer(const char *filename) cutbuffer = was_cutbuffer; /* Insert the processed file into its place. */ - read_file(f, descriptor, filename, FALSE); + read_file(f, descriptor, filename, TRUE); #ifndef NANO_TINY add_undo(COUPLE_END); @@ -577,7 +577,7 @@ void replace_marked_buffer(const char *filename) cutbuffer = was_cutbuffer; /* Insert the processed file where the marked text was. */ - read_file(f, descriptor, filename, FALSE); + read_file(f, descriptor, filename, TRUE); /* Restore the magicline behavior now that we're done fiddling. */ if (!old_no_newlines) diff --git a/src/text.c b/src/text.c index 9e7ff5ad..76ec3600 100644 --- a/src/text.c +++ b/src/text.c @@ -2906,14 +2906,8 @@ const char *do_alt_speller(char *tempfile_name) /* Stat the temporary file again, and mark the buffer as modified only * if this file was changed since it was written. */ stat(tempfile_name, &spellfileinfo); - if (spellfileinfo.st_mtime != timestamp) { + if (spellfileinfo.st_mtime != timestamp) set_modified(); -#ifndef NANO_TINY - /* Flush the undo stack, to avoid making a mess when the user - * tries to undo things in spell-corrected lines. */ - discard_until(NULL, openfile, FALSE); -#endif - } #ifndef NANO_TINY /* Unblock SIGWINCHes again. */