#! /bin/sh /usr/share/dpatch/dpatch-run ## 10_fix-shuffle.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## ## DP: From: Max Kellermann ## DP: Date: Tue, 20 Apr 2010 22:02:54 +0200 ## DP: Subject: [PATCH] screen_queue: fix range selection check on "shuffle" ## DP: ## DP: When list_window_get_range() was changed to become more robust, its ## DP: return value changed when no range was selected. This patch makes ## DP: CMD_SHUFFLE assume that range selection is disabled when only one song ## DP: is selected, and shuffling one song doesn't make sense anyway. @DPATCH@ 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;