]> git.wh0rd.org Git - nano.git/commitdiff
Fixing Savannah bug #47127 the proper way,
authorBenno Schulenberg <bensberg@justemail.net>
Thu, 18 Feb 2016 16:31:02 +0000 (16:31 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Thu, 18 Feb 2016 16:31:02 +0000 (16:31 +0000)
eliding two silly calls of edit_redraw().

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5650 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/search.c
src/text.c
src/winio.c

index 865aea06552081b475b52865046233edb9f36cc0..8a74ed9ca899e26648c5698a70fff054b266a2c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-02-18  Benno Schulenberg  <bensberg@justemail.net>
+       * src/search.c (do_replace_loop), src/text.c (do_int_spell_fix),
+       src/winio.c (edit_refresh): Fix Savannah bug #47127 the proper way.
+
 2016-02-16  Benno Schulenberg  <bensberg@justemail.net>
        * src/files.c (initialize_buffer_text): Delete redundant assignment.
 
index 010540332ff91425534ec48e6d8c4378154832ee..014b11196a586dcebf06d17be2158a5ce435bbf6 100644 (file)
@@ -708,10 +708,7 @@ ssize_t do_replace_loop(
                xpt, strnlenpt(openfile->current->data,
                openfile->current_x + match_len) - xpt, FALSE);
 
-           /* If the match is offscreen, center it; otherwise, let it be. */
-           edit_redraw(openfile->current, openfile->placewewant);
-
-           /* Now refresh the entire edit window, in case it scrolled. */
+           /* Refresh the edit window, scrolling it if necessary. */
            edit_refresh();
 
            /* Don't show cursor, to not distract from highlighted match. */
index 2b2e067521ba0246f68bbb1ad0a696732ce35e9b..da105ea1f1cc93198a80a218f2eaa86e3e8e1012 100644 (file)
@@ -2414,7 +2414,6 @@ bool do_int_spell_fix(const char *word)
                xpt, strnlenpt(openfile->current->data,
                openfile->current_x + match_len) - xpt, FALSE);
 
-           edit_redraw(openfile->current, openfile->placewewant);
            edit_refresh();
 
            do_replace_highlight(TRUE, exp_word);
index a32453b324131c72751642cace1826d113ed1d08..b0ce93ba497a3a5dfe8e93141fcd94c30a53087e 100644 (file)
@@ -2998,7 +2998,7 @@ void edit_refresh(void)
 #endif
 
        /* Make sure the current line is on the screen. */
-       edit_update(ISSET(SMOOTH_SCROLL) ? NONE : CENTER);
+       edit_update((ISSET(SMOOTH_SCROLL) && !focusing) ? NONE : CENTER);
     }
 
     foo = openfile->edittop;