« get me outta code hell

tui-lib - Pure Node.js library for making visual command-line programs (ala vim, ncdu)
about summary refs log tree commit diff
path: root/ui/form
diff options
context:
space:
mode:
Diffstat (limited to 'ui/form')
-rw-r--r--ui/form/Button.js2
1 files changed, 1 insertions, 1 deletions
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
   }