From 9cb132951622b50f9dde5250dc938b264c866a7a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 2 Nov 2009 18:23:53 +0100 Subject: [PATCH] screen_queue: eliminated length check in center() list_window_center() does all the checks fine. Don't duplicate that. --- src/screen_queue.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/screen_queue.c b/src/screen_queue.c index 93b3cfe..4eb3c73 100644 --- a/src/screen_queue.c +++ b/src/screen_queue.c @@ -136,7 +136,6 @@ screen_queue_lw_callback(unsigned idx, G_GNUC_UNUSED void *data) static void center_playing_item(struct mpdclient *c, bool center_cursor) { - unsigned length = c->playlist.list->len; int idx; /* try to center the song that are playing */ @@ -144,13 +143,6 @@ center_playing_item(struct mpdclient *c, bool center_cursor) if (idx < 0) return; - if (length < lw->rows) - { - if (center_cursor) - list_window_set_cursor(lw, idx); - return; - } - list_window_center(lw, idx); if (center_cursor) { -- 2.30.2