replacing: start at the region's edge instead of one step before it

After the changes to the search routine, it is no longer necessary to
take one step back before starting a replacement session.

This fixes https://savannah.gnu.org/bugs/?50147.
master
Benno Schulenberg 2017-01-26 21:36:13 +01:00
parent 437cb410e9
commit da5643853f
1 changed files with 1 additions and 1 deletions

View File

@ -597,7 +597,7 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only,
/* Start either at the top or the bottom of the marked region. */
if (!ISSET(BACKWARDS_SEARCH)) {
openfile->current = top;
openfile->current_x = (top_x == 0 ? 0 : top_x - 1);
openfile->current_x = top_x;
} else {
openfile->current = bot;
openfile->current_x = bot_x;