From: Jonathan Neuschäfer Date: Wed, 31 Aug 2011 12:27:52 +0000 (+0200) Subject: screen_queue: use list_window_move_cursor X-Git-Tag: release-0.20~95^3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aba25b543d7a34ce46964a7f22e495cdc3b57852;p=ncmpc.git screen_queue: use list_window_move_cursor It ensures the cursor stays visible. --- diff --git a/src/screen_queue.c b/src/screen_queue.c index 37a6050..863c3dd 100644 --- a/src/screen_queue.c +++ b/src/screen_queue.c @@ -762,8 +762,7 @@ screen_queue_cmd(struct mpdclient *c, command_t cmd) if (!mpdclient_cmd_move(c, range.end - 1, range.start - 1)) return true; - lw->selected--; - lw->range_base--; + list_window_move_cursor(lw, lw->selected - 1); screen_queue_save_selection(); return true; @@ -776,8 +775,7 @@ screen_queue_cmd(struct mpdclient *c, command_t cmd) if (!mpdclient_cmd_move(c, range.start, range.end)) return true; - lw->selected++; - lw->range_base++; + list_window_move_cursor(lw, lw->selected + 1); screen_queue_save_selection(); return true;