git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#46 StretchLayoutManager working
[fanfix.git]
/
src
/
jexer
/
TList.java
diff --git
a/src/jexer/TList.java
b/src/jexer/TList.java
index f9e721621eda3a76c69f47d33c0132ca37f54722..a962f7cfe9eeee9b3ed579657964765add8bc772 100644
(file)
--- 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 java.util.List;
import jexer.bits.CellAttributes;
+import jexer.bits.StringUtils;
import jexer.event.TKeypressEvent;
import jexer.event.TMouseEvent;
import static jexer.TKeypress.*;
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);
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;
}
}
}
}