diff --git a/ChangeLog b/ChangeLog index 04e8ce78..e532f29d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-02-14 Benno Schulenberg + * src/search.c (do_replace_loop): Make iterating through replacement + matches behave again like iterating through search matches: showing + them centered when found offscreen. This fixes Savannah bug #47127. + 2016-02-13 Benno Schulenberg * src/browser.c (do_browser, browser_refresh): Rebuild the file list only when necessary, not for each and every cursor movement. This diff --git a/src/search.c b/src/search.c index 9d63f7b4..01054033 100644 --- a/src/search.c +++ b/src/search.c @@ -708,6 +708,10 @@ 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. */ edit_refresh(); /* Don't show cursor, to not distract from highlighted match. */