Code

Revert "screen_queue: use list_window_move_cursor"
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 10 Sep 2011 22:02:27 +0000 (00:02 +0200)
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>
Fri, 16 Sep 2011 20:18:15 +0000 (22:18 +0200)
I hadn't quite understood what list_window_move_cursor does, and didn't
test the change.

This reverts commit aba25b543d7a34ce46964a7f22e495cdc3b57852.

src/screen_queue.c

index 863c3dd5f38442e6e432a58d90d8038321869acb..37a60500eea74a6006237af072d93bcfe68a8d76 100644 (file)
@@ -762,7 +762,8 @@ screen_queue_cmd(struct mpdclient *c, command_t cmd)
                if (!mpdclient_cmd_move(c, range.end - 1, range.start - 1))
                        return true;
 
-               list_window_move_cursor(lw, lw->selected - 1);
+               lw->selected--;
+               lw->range_base--;
 
                screen_queue_save_selection();
                return true;
@@ -775,7 +776,8 @@ screen_queue_cmd(struct mpdclient *c, command_t cmd)
                if (!mpdclient_cmd_move(c, range.start, range.end))
                        return true;
 
-               list_window_move_cursor(lw, lw->selected + 1);
+               lw->selected++;
+               lw->range_base++;
 
                screen_queue_save_selection();
                return true;