diff options
author | Max Kellermann <max@duempel.org> | 2008-12-01 17:48:13 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-01 17:48:13 +0100 |
commit | 5ed77879a124224cf5a97dfd095506a2d3e74278 (patch) | |
tree | 6bde15c29c60227ad82fa0861821d9fe11a86d32 /src | |
parent | 0653ea2ff241d64a53012a5f42fbb2389f46de81 (diff) | |
download | mpd-5ed77879a124224cf5a97dfd095506a2d3e74278.tar.gz mpd-5ed77879a124224cf5a97dfd095506a2d3e74278.tar.xz mpd-5ed77879a124224cf5a97dfd095506a2d3e74278.zip |
screen_play: fix scrolling in auto-center mode
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.
Diffstat (limited to '')
-rw-r--r-- | src/screen_play.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/screen_play.c b/src/screen_play.c index 5acde4568..7b94b80ba 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -472,11 +472,7 @@ play_update(mpdclient_t *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 */ @@ -484,6 +480,12 @@ play_update(mpdclient_t *c) center_playing_item(c); playlist_repaint(); +#ifndef NCMPC_MINI + } else if (options.scroll) { + /* always repaint if horizontal scrolling is + enabled */ + playlist_repaint(); +#endif } } |