From 665ebd4662110c8cc14b64356914af9212846caf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 20 Apr 2010 22:02:54 +0200 Subject: [PATCH] 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. --- NEWS | 1 + src/screen_queue.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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; -- 2.30.2