From: Max Kellermann Date: Tue, 20 Apr 2010 20:02:54 +0000 (+0200) Subject: screen_queue: fix range selection check on "shuffle" X-Git-Tag: release-0.17~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=665ebd4662110c8cc14b64356914af9212846caf;p=ncmpc.git screen_queue: fix range selection check on "shuffle" When list_window_get_range() was changed to become more robust, its return value changed when no range was selected. This patch makes CMD_SHUFFLE assume that range selection is disabled when only one song is selected, and shuffling one song doesn't make sense anyway. --- diff --git a/NEWS b/NEWS index e38dc7f..b93ea55 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ncmpc 0.17 - not yet released +* screen_queue: fix range selection check on "shuffle" * po: added Brazilian Portuguese translation diff --git a/src/screen_queue.c b/src/screen_queue.c index c8fad68..67df4b5 100644 --- a/src/screen_queue.c +++ b/src/screen_queue.c @@ -738,7 +738,7 @@ screen_queue_cmd(struct mpdclient *c, command_t cmd) case CMD_SHUFFLE: list_window_get_range(lw, &range); - if (range.end < range.start + 1) + if (range.end <= range.start + 1) /* No range selection, shuffle all list. */ break;