From: Kalle Wallin Date: Mon, 5 Apr 2004 08:59:59 +0000 (+0000) Subject: Fixed the list_window_check_selected() function. X-Git-Tag: v0.12_alpha1~606 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d25aa528e221c51b46b5a461c15493593294db81;p=ncmpc.git Fixed the list_window_check_selected() function. git-svn-id: https://svn.musicpd.org/ncmpc/trunk@607 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/list_window.c b/list_window.c index b04b817..334f7f6 100644 --- a/list_window.c +++ b/list_window.c @@ -48,6 +48,9 @@ list_window_check_selected(list_window_t *lw, int length) if( lw->selected<0 ) lw->selected=0; + while( lw->selectedstart ) + lw->selected++; + while( lw->selected>0 && length>0 && lw->selected>=length ) lw->selected--; }