undo: actually enable undoing/redoing an alternative spellcheck

Make sure the inserts of the spell-checked text are undoable, and no
longer discard the undo stack after running the alternate spell checker.
This commit is contained in:
David Lawrence Ramsey
2018-07-30 17:07:43 -05:00
committed by Benno Schulenberg
parent 115f089d5f
commit c39c9c241b
2 changed files with 3 additions and 9 deletions

View File

@@ -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)