summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0653ea2)
raw | patch | inline | side by side (parent: 0653ea2)
author | Max Kellermann <max@duempel.org> | |
Mon, 1 Dec 2008 16:48:13 +0000 (17:48 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 1 Dec 2008 16:48:13 +0000 (17:48 +0100) |
Commit cfad0fdf enabled horizontal scrolling, but broke auto-center
mode: regardless of whether the current song has changed, it
re-centered the list. Moved the options.scroll check to another "if"
branch.
mode: regardless of whether the current song has changed, it
re-centered the list. Moved the options.scroll check to another "if"
branch.
src/screen_play.c | patch | blob | history |
diff --git a/src/screen_play.c b/src/screen_play.c
index 5acde45680fd8a16a5653ea6afea2eabad2b91c0..7b94b80bafdfa9a632ab6bc94c71abfe2b43c4ca 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
current_song_id = c->song != NULL && c->status != NULL &&
!IS_STOPPED(c->status->state) ? c->song->id : -1;
- if (current_song_id != prev_song_id
-#ifndef NCMPC_MINI
- || options.scroll
-#endif
- ) {
+ if (current_song_id != prev_song_id) {
prev_song_id = current_song_id;
/* center the cursor */
center_playing_item(c);
playlist_repaint();
+#ifndef NCMPC_MINI
+ } else if (options.scroll) {
+ /* always repaint if horizontal scrolling is
+ enabled */
+ playlist_repaint();
+#endif
}
}