From f0b5f697455b4cfb9bdf891c2317cb11e7bd5b4d Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Tue, 7 Jan 2025 21:01:53 +0100 Subject: [PATCH] Fix the ligature support --- main/src/terminal/TerminalBlock.ts | 2 ++ .../extraterm-char-cell-line/src/CharCellLine.ts | 13 +++++++++++++ .../extraterm-char-render-canvas/src/CellPainter.ts | 3 +-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/main/src/terminal/TerminalBlock.ts b/main/src/terminal/TerminalBlock.ts index 14420ac9..efad0cc8 100644 --- a/main/src/terminal/TerminalBlock.ts +++ b/main/src/terminal/TerminalBlock.ts @@ -579,6 +579,8 @@ export class TerminalBlock implements Block { if (ligatureMarker != null) { const text = line.getString(0); ligatureMarker.markLigaturesCharCellLine(line, text); + } else { + line.clearAllLigatures(); } let hoverLinkID = 0; diff --git a/packages/extraterm-char-cell-line/src/CharCellLine.ts b/packages/extraterm-char-cell-line/src/CharCellLine.ts index 40a29755..57839fa9 100644 --- a/packages/extraterm-char-cell-line/src/CharCellLine.ts +++ b/packages/extraterm-char-cell-line/src/CharCellLine.ts @@ -612,6 +612,19 @@ export class CharCellLine { this.#dirtyFlag = true; } + clearAllLigatures(): void { + const width = this.width; + for (let i=0; i