diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-01-17 07:28:36 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-01-17 07:28:36 +0100 |
| commit | 30cd60cc2b2babda36ab752396df58697e9f26fd (patch) | |
| tree | 3091e49b4bd099e6023e2d2c23324494578c23fe /text-motions.c | |
| parent | bd4130068fef76fe152289b7babe5589cd1443ff (diff) | |
| parent | c9831b1120e7c29419183c5fde8cf1bf4e69d5bd (diff) | |
| download | vis-30cd60cc2b2babda36ab752396df58697e9f26fd.tar.gz vis-30cd60cc2b2babda36ab752396df58697e9f26fd.tar.xz | |
Merge branch 'fix-search-wrap' of https://github.com/zsugabubus/vis
Diffstat (limited to 'text-motions.c')
| -rw-r--r-- | text-motions.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/text-motions.c b/text-motions.c index 689bb1f..533d896 100644 --- 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; |
