nano

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

commit bed997171c1c6581f3ddf9d9d5656279559f00fd
parent 8d0b7a490d8accdca82afdcbce596fc54495915e
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Mon, 24 Sep 2018 19:11:10 -0500

speller: restore the mark coordinates slightly later

To avoid a confusing mishighlighting of just part of a marked region.

This partially addresses https://savannah.gnu.org/bugs/?54721.

Diffstat:
Msrc/text.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/text.c b/src/text.c @@ -2599,9 +2599,7 @@ bool fix_spello(const char *word) openfile->mark = NULL; #endif edit_refresh(); -#ifndef NANO_TINY - openfile->mark = saved_mark; -#endif + spotlight(TRUE, from_col, to_col); /* Let the user supply a correctly spelled alternative. */ @@ -2610,6 +2608,10 @@ bool fix_spello(const char *word) spotlight(FALSE, from_col, to_col); +#ifndef NANO_TINY + openfile->mark = saved_mark; +#endif + /* If a replacement was given, go through all occurrences. */ if (proceed && strcmp(word, answer) != 0) { do_replace_loop(word, TRUE, current_save, &current_x_save);