fix SP for underline/overline

This commit is contained in:
Jörg Breitbart
2023-07-22 16:53:13 +02:00
parent 6785dc19ab
commit 329b465a63
@@ -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;