X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTDirectoryList.java;h=4b62bf316b46856ed4d634b834361287b8b7662c;hb=43ad7b6c509c45c8f261e77ea059c10fed8c9f1c;hp=71be2ab5d2ddaa3f97ef17488fa2a1d4b007ee0f;hpb=e16dda65585466c8987bd1efd718431450a96605;p=fanfix.git diff --git a/src/jexer/TDirectoryList.java b/src/jexer/TDirectoryList.java index 71be2ab..4b62bf3 100644 --- a/src/jexer/TDirectoryList.java +++ b/src/jexer/TDirectoryList.java @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (C) 2016 Kevin Lamonte + * Copyright (C) 2017 Kevin Lamonte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -73,6 +73,11 @@ public final class TDirectoryList extends TList { } } setList(newStrings); + + // Select the first entry + if (getMaxSelectedIndex() >= 0) { + setSelectedIndex(0); + } } /**