From 793851b4f65e4b19a59d60e5fa1a68a98b359ca5 Mon Sep 17 00:00:00 2001 From: Patrick Hallen Date: Fri, 4 Sep 2009 23:00:54 +0200 Subject: [PATCH] screen_play: Fixed the scrolling in the playlist screen. Since commit 850ad87b588dd6cbb96e5558ee671f2c95cc839d, which introduced a second column with the length of the song in the playlist screen, scrolling of the entries would sometimes not work, if the entry was smaller than the screen, but bigger than the first column. This easy patch fixes this by using the real size of the first column to decide whether to start scrolling. --- 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 fe9b5c2..46ad68e 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -129,7 +129,7 @@ list_callback(unsigned idx, bool *highlight, char **second_column, G_GNUC_UNUSED if (idx == lw->selected) { - if (options.scroll && utf8_width(songname) > (unsigned)COLS) + if (options.scroll && utf8_width(songname) > (unsigned)(COLS - strlen(*second_column) - 1) ) { static unsigned current_song; char *tmp; -- 2.30.2