From d4c6cd25f639ea5d933e2c4a2d006c96e3138219 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Sat, 27 Apr 2024 12:01:27 +0800 Subject: [PATCH] fix: search for duplicate keyword boundary error #528 --- src/editor/core/draw/interactive/Search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/core/draw/interactive/Search.ts b/src/editor/core/draw/interactive/Search.ts index 7c3be83..6b59a55 100644 --- a/src/editor/core/draw/interactive/Search.ts +++ b/src/editor/core/draw/interactive/Search.ts @@ -222,7 +222,7 @@ export class Search { let index = text.indexOf(payload) while (index !== -1) { matchStartIndexList.push(index) - index = text.indexOf(payload, index + 1) + index = text.indexOf(payload, index + payload.length) } for (let m = 0; m < matchStartIndexList.length; m++) { const startIndex = matchStartIndexList[m]