diff options
author | Max Kellermann <max@duempel.org> | 2008-09-23 13:29:25 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-23 13:29:25 +0200 |
commit | 3b68c580d50a22d6b0716948128cf359defab317 (patch) | |
tree | 1dc504af919e7cf8c13ca5e691680e53d380c888 /src/screen_play.c | |
parent | 5f6cee4616c52bc2cf95afcdb1e3e7a8bed6e393 (diff) | |
download | mpd-3b68c580d50a22d6b0716948128cf359defab317.tar.gz mpd-3b68c580d50a22d6b0716948128cf359defab317.tar.xz mpd-3b68c580d50a22d6b0716948128cf359defab317.zip |
screen_play: use list_window_check_selected()
Instead of manually adjusting the selection, let list_window.c do it.
Diffstat (limited to 'src/screen_play.c')
-rw-r--r-- | src/screen_play.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/screen_play.c b/src/screen_play.c index 625e953d4..265ca4d10 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 { |