« get me outta code hell

Fix listing index not being updated correctly - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-04-08 10:47:23 -0300
committerFlorrie <towerofnix@gmail.com>2019-04-08 10:47:23 -0300
commite4ba8ea5bc16ffd0a324ac50492277c9926329c6 (patch)
tree61aa81ec2df1b53651100ec3919eed97faf3bcc5 /ui.js
parent66ab26062db7fb15251cdd903ab282d408af1d7f (diff)
Fix listing index not being updated correctly
Actually it wasn't being updated at all. We need to pass an element to
selectInput, not an index!
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 1ada92e..72079ae 100644
--- a/ui.js
+++ b/ui.js
@@ -1159,7 +1159,7 @@ class GrouplikeListingElement extends Form {
     if (wasSelected) {
       if (resetIndex) {
         form.scrollItems = 0
-        form.selectInput(form.firstItemIndex)
+        form.selectInput(form.inputs[form.firstItemIndex])
       } else {
         this.root.select(form)
       }