From 288d700ef90de4215b88eb77f7457db65cf67793 Mon Sep 17 00:00:00 2001 From: jefromi Date: Thu, 12 Feb 2009 15:34:00 +0100 Subject: [PATCH] screen_play: move selection when moving a single song in playlist Selection didn't move when moving a single song in playlist. Introduced by the visual selection - selection is only updated when moving in visual mode, not when moving a single song (nonvisual mode). --- src/screen_play.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/screen_play.c b/src/screen_play.c index 75b0f2e..c69f64c 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -624,7 +624,12 @@ play_cmd(mpdclient_t *c, command_t cmd) lw->visual_base--; } else + { mpdclient_cmd_move(c, lw->selected, lw->selected-1); + lw->selected--; + lw->selected_start--; + lw->selected_end--; + } return true; case CMD_LIST_MOVE_DOWN: if(lw->selected_end+1 >= playlist_length(&c->playlist)) @@ -641,7 +646,12 @@ play_cmd(mpdclient_t *c, command_t cmd) lw->visual_base++; } else + { mpdclient_cmd_move(c, lw->selected, lw->selected+1); + lw->selected++; + lw->selected_start++; + lw->selected_end++; + } return true; case CMD_LIST_FIND: case CMD_LIST_RFIND: -- 2.30.2