From 937c47898a3c82dc66a6ba43d27d6dd4fd46fd0b Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <bensberg@justemail.net> Date: Tue, 3 May 2016 11:17:45 +0200 Subject: [PATCH] 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. --- src/text.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/text.c b/src/text.c index 8c447ade..e50b6675 100644 --- a/src/text.c +++ b/src/text.c @@ -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); } } -- GitLab