spelling: pass the correct position of the cursor

When starting to replace misspelled words, pass the actual position
of the cursor instead of the position of the first found occurrence,
so that the cursor position will be updated for changed lengths.

This fixes https://savannah.gnu.org/bugs/?47834.
This commit is contained in:
Benno Schulenberg 2016-05-03 11:17:45 +02:00
parent cc0a3d8490
commit 937c47898a

View File

@ -2449,8 +2449,7 @@ bool do_int_spell_fix(const char *word)
/* If a replacement was given, go through all occurrences. */ /* If a replacement was given, go through all occurrences. */
if (proceed && strcmp(word, answer) != 0) { if (proceed && strcmp(word, answer) != 0) {
openfile->current_x--; openfile->current_x--;
do_replace_loop(TRUE, openfile->current, do_replace_loop(TRUE, current_save, &current_x_save, word);
&openfile->current_x, word);
} }
} }