fix(DomRenderer): resilience when buffer lines are missing (#5998)

* fix(DomRenderer): skip missing buffer lines during row render

renderRows and link underline refresh stopped updating when any
viewport row lacked buffer data, leaving stale DOM on rows below.
Match ImageStorage.render behavior: clear the row element when
present and continue with remaining rows.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(DomRenderer): clear blink state when skipping missing lines

When a viewport row has no buffer line, renderRows clears the row DOM
and continues but did not reset _rowHasBlinkingCells for that row.
That could leave the text blink manager thinking blinking cells remain
after the row was emptied.

Clear blink state for the row when skipping a missing buffer line,
including during link underline refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Daniel Imms
2026-06-06 09:09:32 -07:00
committed by GitHub
co-authored by Cursor
parent 7c24c58007
commit f33f502267
+14 -4
View File
@@ -536,9 +536,14 @@ export class DomRenderer extends Disposable implements IRenderer {
for (let y = start; y <= end; y++) {
const row = y + buffer.ydisp;
const rowElement = this._rowElements[y];
if (!rowElement) {
continue;
}
const lineData = buffer.lines.get(row);
if (!rowElement || !lineData) {
break;
if (!lineData) {
rowElement.replaceChildren();
this._setRowBlinkState(y, false);
continue;
}
rowElement.replaceChildren(
...this._rowFactory.createRow(
@@ -610,9 +615,14 @@ export class DomRenderer extends Disposable implements IRenderer {
for (let i = y; i <= y2; ++i) {
const row = i + buffer.ydisp;
const rowElement = this._rowElements[i];
if (!rowElement) {
continue;
}
const bufferline = buffer.lines.get(row);
if (!rowElement || !bufferline) {
break;
if (!bufferline) {
rowElement.replaceChildren();
this._setRowBlinkState(i, false);
continue;
}
rowElement.replaceChildren(
...this._rowFactory.createRow(