diff options
author | Florrie <towerofnix@gmail.com> | 2018-12-05 16:54:10 -0400 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-12-05 16:54:10 -0400 |
commit | ab193ed3fe91078551c0020e681a191e7b26a122 (patch) | |
tree | 9167ab573f8f82399cb238ce95c8c9c9b541083f /ui/Label.js | |
parent | d59d12196ad00a51d76e0ef4b6808ec2978f7649 (diff) |
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!
Diffstat (limited to 'ui/Label.js')
-rw-r--r-- | ui/Label.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/Label.js b/ui/Label.js index faeee98..e320574 100644 --- a/ui/Label.js +++ b/ui/Label.js @@ -13,7 +13,7 @@ module.exports = class Label extends DisplayElement { } fixLayout() { - this.w = this.text.length + this.w = ansi.measureColumns(this.text) } drawTo(writable) { |