From 9fdf4b303d821b0730a77f4c4554675e8692fff6 Mon Sep 17 00:00:00 2001 From: Kalle Wallin Date: Thu, 22 Apr 2004 20:38:28 +0000 Subject: [PATCH] Fixed list_window_check_selected(). git-svn-id: https://svn.musicpd.org/ncmpc/trunk@876 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- list_window.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/list_window.c b/list_window.c index d0fcaa5..b251310 100644 --- a/list_window.c +++ b/list_window.c @@ -64,6 +64,9 @@ list_window_reset(list_window_t *lw) void list_window_check_selected(list_window_t *lw, int length) { + while( lw->start && lw->start+lw->rows>length) + lw->start--; + if( lw->selected<0 ) lw->selected=0; @@ -175,6 +178,7 @@ list_window_paint(list_window_t *lw, if( lw->start+i == lw->selected ) wattroff(lw->w, A_REVERSE); } + } lw->clear=0; } -- 2.30.2