summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5f6cee4)
raw | patch | inline | side by side (parent: 5f6cee4)
author | Max Kellermann <max@duempel.org> | |
Tue, 23 Sep 2008 11:29:25 +0000 (13:29 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Tue, 23 Sep 2008 11:29:25 +0000 (13:29 +0200) |
Instead of manually adjusting the selection, let list_window.c do it.
src/screen_play.c | patch | blob | history |
diff --git a/src/screen_play.c b/src/screen_play.c
index 625e953d43b4fb6ceed78bd1e606fd47b7a98135..265ca4d10b5057d044d4fdd09981806a3d25e763 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.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 {