X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTList.java;h=a962f7cfe9eeee9b3ed579657964765add8bc772;hb=9f613a0c54cb97e9305fd87ce8eb2f76ac82804e;hp=f9e721621eda3a76c69f47d33c0132ca37f54722;hpb=0c28ec38449a59cf34cf5b3c13ea02add1ee57c5;p=fanfix.git diff --git a/src/jexer/TList.java b/src/jexer/TList.java index f9e7216..a962f7c 100644 --- a/src/jexer/TList.java +++ b/src/jexer/TList.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.List; import jexer.bits.CellAttributes; +import jexer.bits.StringUtils; import jexer.event.TKeypressEvent; import jexer.event.TMouseEvent; import static jexer.TKeypress.*; @@ -338,8 +339,9 @@ public class TList extends TScrollableWidget { for (int i = 0; i < strings.size(); i++) { String line = strings.get(i); - if (line.length() > maxLineWidth) { - maxLineWidth = line.length(); + int lineLength = StringUtils.width(line); + if (lineLength > maxLineWidth) { + maxLineWidth = lineLength; } }