From: Max Kellermann Date: Mon, 2 Nov 2009 17:23:53 +0000 (+0100) Subject: screen_queue: eliminated length check in center() X-Git-Tag: release-0.16~41 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9cb132951622b50f9dde5250dc938b264c866a7a;p=ncmpc.git screen_queue: eliminated length check in center() list_window_center() does all the checks fine. Don't duplicate that. --- 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) {