Add SearchEngine.collectMatches to initialize cache and regex once while gathering matches, and use it from _highlightAllMatches instead of repeated find() calls. Co-authored-by: Cursor <cursoragent@cursor.com>
Add SearchEngine.collectMatches to initialize cache and regex once while gathering matches, and use it from _highlightAllMatches instead of repeated find() calls. Co-authored-by: Cursor <cursoragent@cursor.com>