Commit 937c4789 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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.
No related merge requests found
Showing with 1 addition and 2 deletions
+1 -2
......@@ -2449,8 +2449,7 @@ bool do_int_spell_fix(const char *word)
/* If a replacement was given, go through all occurrences. */
if (proceed && strcmp(word, answer) != 0) {
openfile->current_x--;
do_replace_loop(TRUE, openfile->current,
&openfile->current_x, word);
do_replace_loop(TRUE, current_save, &current_x_save, word);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment