summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 275d9e8)
raw | patch | inline | side by side (parent: 275d9e8)
author | Max Kellermann <max@duempel.org> | |
Mon, 2 Nov 2009 17:23:53 +0000 (18:23 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 2 Nov 2009 17:23:53 +0000 (18:23 +0100) |
list_window_center() does all the checks fine. Don't duplicate that.
src/screen_queue.c | patch | blob | history |
diff --git a/src/screen_queue.c b/src/screen_queue.c
index 93b3cfe5498089967fee682ae998e5d3d6b675a7..4eb3c734e8614c58085edf9c0176d0436d340140 100644 (file)
--- a/src/screen_queue.c
+++ b/src/screen_queue.c
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 */
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) {