speller: hook up a full alternative spellcheck to the undo system
This commit is contained in:
committed by
Benno Schulenberg
parent
bc6787826a
commit
7f6460b804
14
src/files.c
14
src/files.c
@@ -521,16 +521,30 @@ void replace_buffer(const char *filename)
|
|||||||
if (descriptor < 0)
|
if (descriptor < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
add_undo(COUPLE_BEGIN);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Throw away the text of the file. */
|
/* Throw away the text of the file. */
|
||||||
cutbuffer = NULL;
|
cutbuffer = NULL;
|
||||||
openfile->current = openfile->fileage;
|
openfile->current = openfile->fileage;
|
||||||
openfile->current_x = 0;
|
openfile->current_x = 0;
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
add_undo(CUT_TO_EOF);
|
||||||
|
#endif
|
||||||
do_cut_text(FALSE, FALSE, TRUE);
|
do_cut_text(FALSE, FALSE, TRUE);
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
update_undo(CUT_TO_EOF);
|
||||||
|
#endif
|
||||||
free_filestruct(cutbuffer);
|
free_filestruct(cutbuffer);
|
||||||
cutbuffer = was_cutbuffer;
|
cutbuffer = was_cutbuffer;
|
||||||
|
|
||||||
/* Insert the processed file into its place. */
|
/* Insert the processed file into its place. */
|
||||||
read_file(f, descriptor, filename, FALSE);
|
read_file(f, descriptor, filename, FALSE);
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
add_undo(COUPLE_END);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
|||||||
Reference in New Issue
Block a user