« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 5a6a6c9..7a3a333 100644
--- a/ui.js
+++ b/ui.js
@@ -275,7 +275,7 @@ class GrouplikeListingElement extends ListScrollForm {
 
     if (wasSelected) {
       if (resetIndex) {
-        this.curIndex = 0
+        this.curIndex = Math.min(this.inputs.length, 1)
         this.scrollItems = 0
         this.updateSelectedElement()
       } else {