nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 937c47898a3c82dc66a6ba43d27d6dd4fd46fd0b
parent cc0a3d84901ed2d1ad8cc69893edf2b0642616ea
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue,  3 May 2016 11:17:45 +0200

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.

Diffstat:
Msrc/text.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 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, &current_x_save, word); } }