Bug fixes
[nikiroo-utils.git] / src / jexer / TList.java
index 71600485fe2b9cb1646a8df8a3c0fa5c7af5755d..644c5647afafa5cb7ce81d3f3a75b3faa3908dd1 100644 (file)
@@ -81,6 +81,15 @@ public class TList extends TScrollableWidget {
         return null;
     }
 
+    /**
+     * Get the maximum selection index value.
+     *
+     * @return -1 if the list is empty
+     */
+    public final int getMaxSelectedIndex() {
+        return strings.size() - 1;
+    }
+
     /**
      * Set the new list of strings to display.
      *