From 529da8e238a21a5519a7f6bb31ad447a529a7a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 17 Apr 2022 19:40:51 +0200 Subject: [PATCH] search: match iterator: handle overlapping matches --- search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/search.c b/search.c index 970a04b4..e7961dc9 100644 --- a/search.c +++ b/search.c @@ -485,8 +485,8 @@ search_matches_next(struct search_match_iterator *iter) iter->start.col = 0; } else { /* Continue at next column, next time */ - iter->start.row = match.end.row; - iter->start.col = match.end.col + 1; + iter->start.row = match.start.row; + iter->start.col = match.start.col + 1; if (match.start.row == term->search.match.row && match.start.col == term->search.match.col)