diff --git a/ChangeLog b/ChangeLog index 865aea06..8a74ed9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-02-18 Benno Schulenberg + * 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 * src/files.c (initialize_buffer_text): Delete redundant assignment. diff --git a/src/search.c b/src/search.c index 01054033..014b1119 100644 --- a/src/search.c +++ b/src/search.c @@ -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. */ diff --git a/src/text.c b/src/text.c index 2b2e0675..da105ea1 100644 --- a/src/text.c +++ b/src/text.c @@ -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); diff --git a/src/winio.c b/src/winio.c index a32453b3..b0ce93ba 100644 --- a/src/winio.c +++ b/src/winio.c @@ -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;