From 329b465a63e5127f371a8234edb2aa29ab0d4b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Breitbart?= Date: Sat, 22 Jul 2023 16:53:13 +0200 Subject: [PATCH] fix SP for underline/overline --- src/browser/renderer/dom/DomRendererRowFactory.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/browser/renderer/dom/DomRendererRowFactory.ts b/src/browser/renderer/dom/DomRendererRowFactory.ts index cc65f53d..c9a0059a 100644 --- a/src/browser/renderer/dom/DomRendererRowFactory.ts +++ b/src/browser/renderer/dom/DomRendererRowFactory.ts @@ -138,7 +138,6 @@ export class DomRendererRowFactory { * - char not part of a selection * - char is not cursor */ - // FIMXE: add combined check, fix \xa0 text handling as below if ( cellAmount && width === 1 && !isCombined && cell.bg === oldBg && cell.fg === oldFg && cell.extended.ext === oldExt @@ -146,7 +145,11 @@ export class DomRendererRowFactory { && !isInSelection && !isCursorCell ) { - text += cell.getChars() || WHITESPACE_CELL_CHAR; + let c = cell.isInvisible() ? WHITESPACE_CELL_CHAR : (cell.getChars() || WHITESPACE_CELL_CHAR); + if (c === ' ' && (cell.isUnderline() || cell.isOverline())) { + c = '\xa0'; + } + text += c; cellAmount++; oldBg = cell.bg; oldFg = cell.fg;