nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit c88fae3310f36ef222882d3dd8b5aaaa469742d6
parent 68cfb08888a701b8ed330299f4844d3a473c804c
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Wed, 27 Jul 2016 09:04:06 +0200

search: match a beginning-of-line anchor just once per line

This fixes https://savannah.gnu.org/bugs/?48635.

Diffstat:
Msrc/search.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/search.c b/src/search.c @@ -745,8 +745,8 @@ ssize_t do_replace_loop( } #ifdef HAVE_REGEX_H - /* Don't find the same zero-length match again. */ - if (match_len == 0) + /* Don't find the same zero-length or BOL match again. */ + if (match_len == 0 || (*needle == '^' && ISSET(USE_REGEXP))) match_len++; #endif