diff --git a/cbd-tui/src/app/queue.rs b/cbd-tui/src/app/queue.rs index 0f48eba..4702dc0 100644 --- a/cbd-tui/src/app/queue.rs +++ b/cbd-tui/src/app/queue.rs @@ -41,6 +41,9 @@ impl Queue { self.tx.send(MessageFromUi::SetCurrentTrack(pos)); } } + pub fn select_current(&mut self) { + self.select(Some(self.current_position)); + } pub fn remove_track(&mut self) { if let Some(pos) = self.selected() { // FIXME: mark multiple tracks on queue and remove them diff --git a/cbd-tui/src/main.rs b/cbd-tui/src/main.rs index ed9c6cb..b536d30 100644 --- a/cbd-tui/src/main.rs +++ b/cbd-tui/src/main.rs @@ -303,6 +303,9 @@ fn run_ui(tx: Sender, rx: Receiver) { (UiFocus::Queue, KeyModifiers::CONTROL, KeyCode::Char('u')) => { app.queue.up(); } + (UiFocus::Queue, KeyModifiers::NONE, KeyCode::Char('o')) => { + app.queue.select_current(); + } (UiFocus::Queue, KeyModifiers::NONE, KeyCode::Enter) => { app.queue.play_selected(); }