mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-30 08:33:17 +03:00
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:
parent
cc0a3d8490
commit
937c47898a
@ -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, ¤t_x_save, word);
|
||||||
&openfile->current_x, word);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user