X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTDirectoryList.java;h=4b62bf316b46856ed4d634b834361287b8b7662c;hb=fe0770f988e64fc0ccafd3d3b086b4a0eb559d3b;hp=642366b7e23c42f11bf1baedacb8363c15fa1e00;hpb=df602ccf5e32585c26dc618dd3b4a759b6820943;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); + } } /**