From 3b68c580d50a22d6b0716948128cf359defab317 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 23 Sep 2008 13:29:25 +0200 Subject: [PATCH] screen_play: use list_window_check_selected() Instead of manually adjusting the selection, let list_window.c do it. --- src/screen_play.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/screen_play.c b/src/screen_play.c index 625e953..265ca4d 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -400,11 +400,7 @@ play_update(screen_t *screen, mpdclient_t *c) } if (c->playlist.id != playlist_id) { - if (lw->selected >= c->playlist.list->len) - lw->selected = c->playlist.list->len - 1; - if (lw->start >= c->playlist.list->len) - list_window_reset(lw); - + list_window_check_selected(lw, playlist_length(&c->playlist)); play_paint(screen, c); playlist_id = c->playlist.id; } else { -- 2.30.2