Code

Fixed the list_window_check_selected() function.
authorKalle Wallin <kaw@linux.se>
Mon, 5 Apr 2004 08:59:59 +0000 (08:59 +0000)
committerKalle Wallin <kaw@linux.se>
Mon, 5 Apr 2004 08:59:59 +0000 (08:59 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@607 09075e82-0dd4-0310-85a5-a0d7c8717e4f

list_window.c

index b04b817daab212dc7cc5a0e8d9750441273b89fc..334f7f6eb5dbfd6bba30bf01d800518d19d6a794 100644 (file)
@@ -48,6 +48,9 @@ list_window_check_selected(list_window_t *lw, int length)
   if( lw->selected<0 )
     lw->selected=0;
 
+  while( lw->selected<lw->start )
+    lw->selected++;
+
   while( lw->selected>0 && length>0 && lw->selected>=length )
     lw->selected--;
 }