X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTDirectoryList.java;h=4b62bf316b46856ed4d634b834361287b8b7662c;hb=43ad7b6c509c45c8f261e77ea059c10fed8c9f1c;hp=642366b7e23c42f11bf1baedacb8363c15fa1e00;hpb=a2018e9964f6c58742cd1e6dd0a0c63e244a89d6;p=fanfix.git diff --git a/src/jexer/TDirectoryList.java b/src/jexer/TDirectoryList.java index 642366b..4b62bf3 100644 --- a/src/jexer/TDirectoryList.java +++ b/src/jexer/TDirectoryList.java @@ -73,6 +73,11 @@ public final class TDirectoryList extends TList { } } setList(newStrings); + + // Select the first entry + if (getMaxSelectedIndex() >= 0) { + setSelectedIndex(0); + } } /**