From d1ec95c6a225c96315fd48660cd4db0573b66472 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 Jul 2009 23:11:40 +0200 Subject: [PATCH] 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. --- src/screen_play.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2