Bug fixes
[nikiroo-utils.git] / src / jexer / TDirectoryList.java
index 642366b7e23c42f11bf1baedacb8363c15fa1e00..4b62bf316b46856ed4d634b834361287b8b7662c 100644 (file)
@@ -73,6 +73,11 @@ public final class TDirectoryList extends TList {
             }
         }
         setList(newStrings);
+
+        // Select the first entry
+        if (getMaxSelectedIndex() >= 0) {
+            setSelectedIndex(0);
+        }
     }
 
     /**