speller: restore the mark coordinates slightly later

To avoid a confusing mishighlighting of just part of a marked region.

This partially addresses https://savannah.gnu.org/bugs/?54721.
master
David Lawrence Ramsey 2018-09-24 19:11:10 -05:00 committed by Benno Schulenberg
parent 8d0b7a490d
commit bed997171c
1 changed files with 5 additions and 3 deletions

View File

@ -2599,9 +2599,7 @@ bool fix_spello(const char *word)
openfile->mark = NULL;
#endif
edit_refresh();
#ifndef NANO_TINY
openfile->mark = saved_mark;
#endif
spotlight(TRUE, from_col, to_col);
/* Let the user supply a correctly spelled alternative. */
@ -2610,6 +2608,10 @@ bool fix_spello(const char *word)
spotlight(FALSE, from_col, to_col);
#ifndef NANO_TINY
openfile->mark = saved_mark;
#endif
/* If a replacement was given, go through all occurrences. */
if (proceed && strcmp(word, answer) != 0) {
do_replace_loop(word, TRUE, current_save, &current_x_save);