From: Max Kellermann Date: Wed, 8 Jul 2009 21:11:40 +0000 (+0200) Subject: screen_play: use "idx" instead of "song->pos" X-Git-Tag: release-0.15~42 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1ec95c6a225c96315fd48660cd4db0573b66472;p=ncmpc.git screen_play: use "idx" instead of "song->pos" The attribute song->pos may be unreliable. Since the list_window.c code already passed the current position to us (parameter "idx"), let's use it instead. --- diff --git a/src/screen_play.c b/src/screen_play.c index e194466..fe9b5c2 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -127,7 +127,7 @@ list_callback(unsigned idx, bool *highlight, char **second_column, G_GNUC_UNUSED if(second_column) *second_column = format_duration(song->time); - if ((unsigned)song->pos == lw->selected) + if (idx == lw->selected) { if (options.scroll && utf8_width(songname) > (unsigned)COLS) {