« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
m---------tui-lib0
-rw-r--r--ui.js4
2 files changed, 2 insertions, 2 deletions
diff --git a/tui-lib b/tui-lib
-Subproject 754f834035271279b279a13514c8031069dc4f7
+Subproject ab193ed3fe91078551c0020e681a191e7b26a12
diff --git a/ui.js b/ui.js
index 7bc6ed2..2fdbaed 100644
--- a/ui.js
+++ b/ui.js
@@ -998,7 +998,7 @@ class BasicGrouplikeItemElement extends Button {
     this.drawX = this.x
     this.writeStatus(writable)
     writable.write(this.text.slice(0, this.w - this.drawX))
-    this.drawX += this.text.length
+    this.drawX += ansi.measureColumns(this.text)
     writable.write(' '.repeat(Math.max(0, this.w - this.drawX)))
 
     writable.write(ansi.resetAttributes())
@@ -1606,7 +1606,7 @@ class TabberListItem extends FocusElement {
   }
 
   fixLayout() {
-    this.w = this.text.length + 3
+    this.w = ansi.measureColumns(this.text) + 3
   }
 
   drawTo(writable) {