« get me outta code hell

Move Mark into menu - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-08-03 10:46:19 -0300
committerFlorrie <towerofnix@gmail.com>2018-08-03 10:46:19 -0300
commit366d162c6b4bf2e9365ba08c0fab6b76641d5e28 (patch)
treeaf374c6b41732ced4e0df5b3053ab28ed7998940
parentaf3894b99868e8fabe9e2f0c640184f952e216a2 (diff)
Move Mark into menu
-rw-r--r--ui.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/ui.js b/ui.js
index 1c673a5..af7db75 100644
--- a/ui.js
+++ b/ui.js
@@ -933,15 +933,13 @@ class GrouplikeItemElement extends Button {
       }
     } else if (telc.isCaselessLetter(keyBuf, 'x')) {
       this.emit('remove')
-    /*
-    } else if (telc.isCaselessLetter(keyBuf, 'm')) {
-      this.emit('mark')
-    */
     } else if (telc.isCaselessLetter(keyBuf, 'm')) {
+      const editMode = this.recordStore.app.editMode
       this.emit('menu', {
         x: this.absLeft,
         y: this.absTop + 1,
         items: [
+          editMode && {label: this.isMarked ? 'Unmark' : 'Mark', action: () => this.emit('mark')},
           {label: 'Play', action: () => this.emit('queue', {where: 'next', play: true})},
           {label: 'Play next', action: () => this.emit('queue', {where: 'next'})},
           {label: 'Play at end', action: () => this.emit('queue', {where: 'end'})},