From 8b0fbf6073b905ead6bed875c749c6332429aa27 Mon Sep 17 00:00:00 2001 From: Chapman Pendery <35637443+cpendery@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:43:28 -0800 Subject: [PATCH] fix: recoloring cells when suggestions are hidden (#103) Signed-off-by: Chapman Pendery --- src/isterm/pty.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/isterm/pty.ts b/src/isterm/pty.ts index 899460b..a81a748 100644 --- a/src/isterm/pty.ts +++ b/src/isterm/pty.ts @@ -178,10 +178,9 @@ export class ISTerm implements IPty { const line = this.#term.buffer.active.getLine(y); const ansiLine = ["\x1b[0m"]; if (line == null) return ""; - let cell = line.getCell(0); let prevCell: xterm.IBufferCell | undefined; for (let x = 0; x < line.length; x++) { - cell = line.getCell(x, cell); + const cell = line.getCell(x); const chars = cell?.getChars() ?? ""; if (!this._sameColor(prevCell, cell)) { ansiLine.push(this._getAnsiColors(cell));