aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-04-05 08:59:59 +0000
committerKalle Wallin <kaw@linux.se>2004-04-05 08:59:59 +0000
commitd25aa528e221c51b46b5a461c15493593294db81 (patch)
tree88a5548f508893ffc4f7a0d9ce61735e3323d447
parent1c6b0bdb5df4c42a7fcc77fd786f49e03449924b (diff)
downloadmpd-d25aa528e221c51b46b5a461c15493593294db81.tar.gz
mpd-d25aa528e221c51b46b5a461c15493593294db81.tar.xz
mpd-d25aa528e221c51b46b5a461c15493593294db81.zip
Fixed the list_window_check_selected() function.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@607 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--list_window.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/list_window.c b/list_window.c
index b04b817da..334f7f6eb 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->selected<lw->start )
+ lw->selected++;
+
while( lw->selected>0 && length>0 && lw->selected>=length )
lw->selected--;
}