summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 13b9b08)
raw | patch | inline | side by side (parent: 13b9b08)
author | Max Kellermann <max@duempel.org> | |
Wed, 8 Jul 2009 21:11:40 +0000 (23:11 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 8 Jul 2009 21:11:40 +0000 (23:11 +0200) |
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.
code already passed the current position to us (parameter "idx"),
let's use it instead.
src/screen_play.c | patch | blob | history |
diff --git a/src/screen_play.c b/src/screen_play.c
index e1944663068da3d46aa6f40e5718786c9c1bd39d..fe9b5c2659ca6ecab6c9860588ab8181377026d3 100644 (file)
--- 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)
{