From 17cebdebce43c3a5101d25e099f6536603f8d451 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 4 Mar 2018 13:35:57 -0700 Subject: [PATCH] Better fillChar handling --- core/text_view.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/text_view.js b/core/text_view.js index ea9c352a..8de04484 100644 --- a/core/text_view.js +++ b/core/text_view.js @@ -31,7 +31,7 @@ function TextView(options) { this.maxLength = this.client.term.termWidth - this.position.col; } - this.fillChar = miscUtil.valueWithDefault(options.fillChar, ' ').substr(0, 1); + this.fillChar = renderSubstr(miscUtil.valueWithDefault(options.fillChar, ' '), 0, 1); this.justify = options.justify || 'left'; this.resizable = miscUtil.valueWithDefault(options.resizable, true); this.horizScroll = miscUtil.valueWithDefault(options.horizScroll, true); @@ -120,11 +120,13 @@ function TextView(options) { } } + const renderedFillChar = pipeToAnsi(this.fillChar); + this.client.term.write( padStr( textToDraw, this.dimens.width + 1, - this.fillChar, + renderedFillChar, //this.fillChar, this.justify, this.hasFocus ? this.getFocusSGR() : this.getSGR(), this.getStyleSGR(1) || this.getSGR()