From 4888f8f9b6bd6ef343cf5222547d9aa68c8e1499 Mon Sep 17 00:00:00 2001 From: Marc Andre Tanner Date: Mon, 25 Mar 2013 09:16:14 +0100 Subject: [PATCH] vt: fix search functionality for "substring match" before Count wasn't found in SLOCCount Signed-off-by: Marc Andre Tanner --- vt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vt.c b/vt.c index a8e7d42..89a7c30 100644 --- a/vt.c +++ b/vt.c @@ -1799,8 +1799,13 @@ static void copymode_search(Vt *t, int direction) else if (width >= 1) width--; col += direction > 0 ? width : -width; - } else + } else if (searchbuf[s_start] == row->cells[col].text) { + s = s_start + direction; + matched_row = row; + matched_col = col; + } else { s = s_start; + } } if ((row = buffer_next_row(b, row, direction)) == start_row) -- 2.11.4.GIT