From a84a95055d6bb297723dadfb029b4895567a77e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Breitbart?= Date: Wed, 9 Aug 2023 14:20:08 +0200 Subject: [PATCH] exclude decorated cells from merging --- src/browser/renderer/dom/DomRendererRowFactory.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/browser/renderer/dom/DomRendererRowFactory.ts b/src/browser/renderer/dom/DomRendererRowFactory.ts index 3f9765f0..186a1eb3 100644 --- a/src/browser/renderer/dom/DomRendererRowFactory.ts +++ b/src/browser/renderer/dom/DomRendererRowFactory.ts @@ -131,6 +131,11 @@ export class DomRendererRowFactory { const isCursorCell = isCursorRow && x === cursorX; const isLinkHover = hasHover && x >= linkStart && x <= linkEnd; + let isDecorated = false; + this._decorationService.forEachDecorationAtCell(x, row, undefined, d => { + isDecorated = true; + }); + // get chars to render for this cell let chars = cell.getChars() || WHITESPACE_CELL_CHAR; if (chars === ' ' && (cell.isUnderline() || cell.isOverline())) { @@ -160,6 +165,7 @@ export class DomRendererRowFactory { && spacing === oldSpacing && !isCursorCell && !isJoined + && !isDecorated ) { // no span alterations, thus only account chars skipping all code below text += chars; @@ -386,7 +392,7 @@ export class DomRendererRowFactory { } // exclude conditions for cell merging - never merge these - if (!isCursorCell && !isInSelection && !isJoined) { + if (!isCursorCell && !isInSelection && !isJoined && !isDecorated) { cellAmount++; } else { charElement.textContent = text;