diff options
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; |
