From 70e15534e1b256261ce003f053172cde10c3842e Mon Sep 17 00:00:00 2001 From: Chapman Pendery Date: Fri, 8 Nov 2024 13:42:59 -0800 Subject: [PATCH] fix: wide cells on rewrite Signed-off-by: Chapman Pendery --- src/isterm/pty.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/isterm/pty.ts b/src/isterm/pty.ts index c712415..2f06239 100644 --- a/src/isterm/pty.ts +++ b/src/isterm/pty.ts @@ -298,7 +298,9 @@ export class ISTerm implements IPty { if (!sameAccents) { ansiLine.push(this._getAnsiAccents(cell)); } - ansiLine.push(chars == "" ? ansi.cursorForward() : chars); + const isWide = prevCell?.getWidth() == 2 && cell?.getWidth() == 0; + const cursorForward = isWide ? "" : ansi.cursorForward(); + ansiLine.push(chars == "" ? cursorForward : chars); prevCell = cell; } return ansiLine.join("");