From 467eb5a227daa211d7939a724e74f1757dc4467a Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 6 Jun 2026 16:26:54 +0000 Subject: [PATCH] fix(addon-image): cast buffer line lookups to IBufferLineExt | undefined Co-authored-by: Daniel Imms --- addons/addon-image/src/ImageStorage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/addon-image/src/ImageStorage.ts b/addons/addon-image/src/ImageStorage.ts index 6c43c46a2..2591953e1 100644 --- a/addons/addon-image/src/ImageStorage.ts +++ b/addons/addon-image/src/ImageStorage.ts @@ -431,7 +431,7 @@ export class ImageStorage implements IDisposable { // because text writes clear the BG flag but leave image tile data intact. // This lets top-layer images survive text overwrites (kitty C=1 behavior). for (let row = start; row <= end; ++row) { - const line = buffer.lines.get(row + buffer.ydisp) as IBufferLineExt; + const line = buffer.lines.get(row + buffer.ydisp) as IBufferLineExt | undefined; if (!line) continue; for (let col = 0; col < cols; ++col) { let e: IExtendedAttrsImage; @@ -513,7 +513,7 @@ export class ImageStorage implements IDisposable { const rows = buffer.lines.length; const oldCol = this._viewportMetrics.cols - 1; for (let row = 0; row < rows; ++row) { - const line = buffer.lines.get(row) as IBufferLineExt; + const line = buffer.lines.get(row) as IBufferLineExt | undefined; if (!line) { continue; }