vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit ce16a3b8c5709da009c53ef2537b169becd83c52
parent 13bd15cbd1cd5a98fb384fb85eccc7f0ff0eceec
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 17 Jan 2020 07:28:36 +0100

Merge branch 'fix-search-wrap' of https://github.com/zsugabubus/vis

Diffstat:
Mtext-motions.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/text-motions.c b/text-motions.c @@ -622,8 +622,7 @@ size_t text_search_forward(Text *txt, size_t pos, Regex *regex) { if (!found) { start = 0; - end = pos; - found = !text_search_range_forward(txt, start, end, regex, 1, match, 0); + found = !text_search_range_forward(txt, start, end - start, regex, 1, match, 0); } return found ? match[0].start : pos;