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/form/Button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/form/Button.js') diff --git a/ui/form/Button.js b/ui/form/Button.js index 1f1c537..3a35912 100644 --- a/ui/form/Button.js +++ b/ui/form/Button.js @@ -16,7 +16,7 @@ module.exports = class Button extends FocusElement { } fixLayout() { - this.w = this.text.length + this.w = ansi.measureColumns(this.text) this.h = 1 } -- cgit 1.3.0-6-gf8a5