#35 wip
[fanfix.git] / src / jexer / ttree / TTreeViewWidget.java
index adb9a5d8e354b1974d70843e608944e0dd4b5c8b..9ffb72461709645a428886f944a63a55213db006 100644 (file)
@@ -3,7 +3,7 @@
  *
  * The MIT License (MIT)
  *
- * Copyright (C) 2017 Kevin Lamonte
+ * Copyright (C) 2019 Kevin Lamonte
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -34,6 +34,7 @@ import jexer.TKeypress;
 import jexer.TScrollableWidget;
 import jexer.TVScroller;
 import jexer.TWidget;
+import jexer.bits.StringUtils;
 import jexer.event.TKeypressEvent;
 import jexer.event.TMouseEvent;
 import static jexer.TKeypress.*;
@@ -279,7 +280,7 @@ public class TTreeViewWidget extends TScrollableWidget {
                 selectedRow++;
             }
 
-            int lineWidth = item.getText().length()
+            int lineWidth = StringUtils.width(item.getText())
                 + item.getPrefix().length() + 4;
             if (lineWidth > maxLineWidth) {
                 maxLineWidth = lineWidth;