commit da5643853fe5ffc93061475169e1e54a7922e08d
parent 437cb410e945204de70e39e4bf5afd0aa750ea5f
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 26 Jan 2017 21:36:13 +0100
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/search.c b/src/search.c
@@ -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;