mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 14:51:36 +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 (proceed && strcmp(word, answer) != 0) {
|
||||
openfile->current_x--;
|
||||
do_replace_loop(TRUE, openfile->current,
|
||||
&openfile->current_x, word);
|
||||
do_replace_loop(TRUE, current_save, ¤t_x_save, word);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user