X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTDirectoryList.java;h=c47b33054e95e8c200a24ee8c80f307ef11a86fe;hb=051e29138b18fb4b731a72f8727475b10e4c74e4;hp=71be2ab5d2ddaa3f97ef17488fa2a1d4b007ee0f;hpb=e16dda65585466c8987bd1efd718431450a96605;p=fanfix.git diff --git a/src/jexer/TDirectoryList.java b/src/jexer/TDirectoryList.java index 71be2ab..c47b330 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"), @@ -35,7 +35,7 @@ import java.util.List; /** * TDirectoryList shows the files within a directory. */ -public final class TDirectoryList extends TList { +public class TDirectoryList extends TList { /** * Files in the directory. @@ -73,6 +73,11 @@ public final class TDirectoryList extends TList { } } setList(newStrings); + + // Select the first entry + if (getMaxSelectedIndex() >= 0) { + setSelectedIndex(0); + } } /**