From ab193ed3fe91078551c0020e681a191e7b26a122 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 5 Dec 2018 16:54:10 -0400 Subject: Use measureColumns in the appropriate places TL;DR If you want to take into account the width of text, use measureColumns instead of just checking the length of the text! --- ui/Pane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/Pane.js') diff --git a/ui/Pane.js b/ui/Pane.js index 4e08c55..b33a1b7 100644 --- a/ui/Pane.js +++ b/ui/Pane.js @@ -86,7 +86,7 @@ module.exports = class Pane extends DisplayElement { const pane = new Pane() pane.frameColor = ansi.C_WHITE - pane.w = text.length + 2 + pane.w = ansi.measureColumns(text) + 2 pane.h = 3 parent.addChild(pane) -- cgit 1.3.0-6-gf8a5