Fix WebCRT build regression and AuditPage nullish coalescing.

Remove duplicate serializeTerminal fragment that broke WebTerminal compilation; rewrite ne.exec_batch count without mixing ?? and ||.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-02 10:33:10 +08:00
parent 3fd1e9131d
commit a9c7e81793
2 changed files with 6 additions and 11 deletions

View file

@ -123,16 +123,6 @@ function serializeTerminal(term: Terminal): string {
return lines.join("\n").replace(/\s+$/g, "");
}
const buf = term.buffer.active;
const lines: string[] = [];
for (let i = 0; i < buf.length; i += 1) {
const line = buf.getLine(i);
if (!line) continue;
lines.push(line.translateToString(true));
}
return lines.join("\n").replace(/\s+$/g, "");
}
/** Line-wise search — avoids serializing the full scrollback on every Find. */
function findBufferLine(
term: Terminal,