Skip to content

Commit

Permalink
fix: wide cells on rewrite (#302)
Browse files Browse the repository at this point in the history
Signed-off-by: Chapman Pendery <[email protected]>
  • Loading branch information
cpendery authored Nov 8, 2024
1 parent 9e995bb commit 95a02c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/isterm/pty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
Expand Down

0 comments on commit 95a02c1

Please sign in to comment.