Code

screen_queue: fix range selection check on "shuffle"
authorMax Kellermann <max@duempel.org>
Tue, 20 Apr 2010 20:02:54 +0000 (22:02 +0200)
committerMax Kellermann <max@duempel.org>
Tue, 20 Apr 2010 20:02:54 +0000 (22:02 +0200)
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.

NEWS
src/screen_queue.c

diff --git a/NEWS b/NEWS
index e38dc7f097db973ec92d07f64987084b79a3a399..b93ea55c9190513a8d24ec69230811a7c4950a99 100644 (file)
--- 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
 
 
index c8fad68d2c7e52e2cf126a7aae6312ac094d7b51..67df4b53655b7f3603cf174ae48c1a88c724b266 100644 (file)
@@ -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;