« get me outta code hell

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:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui.js b/ui.js
index 7ef13f0..aafe064 100644
--- a/ui.js
+++ b/ui.js
@@ -513,10 +513,14 @@ class AppElement extends FocusElement {
 
     const tabberListing = this.tabber.currentElement
     this.root.select(tabberListing)
+
+    const parent = item[parentSymbol]
     if (isGroup(item)) {
       tabberListing.loadGrouplike(item)
-    } else if (item[parentSymbol]) {
-      tabberListing.loadGrouplike(item[parentSymbol])
+    } else if (parent) {
+      if (tabberListing.grouplike !== parent) {
+        tabberListing.loadGrouplike(parent)
+      }
       tabberListing.selectAndShow(item)
     }
   }