Use canonical BufferLine translation for search line text.

This enables BufferLine internal full-line string caching on cold-cache searches and substantially reduces findNext cold-cache runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Daniel Imms
2026-05-26 07:18:55 -07:00
co-authored by Cursor
parent 0f0c615748
commit c55a248d52
+1 -1
View File
@@ -379,7 +379,7 @@ export class SearchAddon extends Disposable implements ITerminalAddon, ISearchAp
const blankLine = ' '.repeat(cols);
for (const row of rows) {
const line = terminal.buffer.active.getLine(row);
textParts.push(line ? line.translateToString(false, 0, cols) : blankLine);
textParts.push(line ? line.translateToString() : blankLine);
}
return textParts.join('');
}