Prevent blink interval from running unless needed

Part of #944
This commit is contained in:
Daniel Imms
2026-02-03 05:07:40 -08:00
parent c102b4af50
commit 205cf6089d
7 changed files with 218 additions and 11 deletions
@@ -71,10 +71,14 @@ export class DomRendererRowFactory {
cellWidth: number,
widthCache: WidthCache,
linkStart: number,
linkEnd: number
linkEnd: number,
rowInfo?: { hasBlinkingCells: boolean }
): HTMLSpanElement[] {
const elements: HTMLSpanElement[] = [];
if (rowInfo) {
rowInfo.hasBlinkingCells = false;
}
const joinedRanges = this._characterJoinerService.getJoinedCharacters(row);
const colors = this._themeService.colors;
@@ -155,6 +159,9 @@ export class DomRendererRowFactory {
const isInSelection = this._isCellInSelection(x, row);
const isCursorCell = isCursorRow && x === cursorX;
const isLinkHover = hasHover && x >= linkStart && x <= linkEnd;
if (rowInfo && cell.isBlink()) {
rowInfo.hasBlinkingCells = true;
}
const isBlinkHidden = !blinkOn && cell.isBlink();
if (isBlinkHidden) {
classes.push(RowCss.BLINK_HIDDEN_CLASS);