From: Kalle Wallin Date: Thu, 22 Apr 2004 20:38:28 +0000 (+0000) Subject: Fixed list_window_check_selected(). X-Git-Tag: v0.12_alpha1~563 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9fdf4b303d821b0730a77f4c4554675e8692fff6;p=ncmpc.git Fixed list_window_check_selected(). git-svn-id: https://svn.musicpd.org/ncmpc/trunk@876 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- 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; }