diff options
author | Kalle Wallin <kaw@linux.se> | 2004-04-22 20:38:28 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-04-22 20:38:28 +0000 |
commit | 9fdf4b303d821b0730a77f4c4554675e8692fff6 (patch) | |
tree | c71d69eb2c40587a1b51d85828c29069709cd475 /list_window.c | |
parent | 9cd22a2d5703c1f8159e0614a3c1c4dd086a1158 (diff) | |
download | mpd-9fdf4b303d821b0730a77f4c4554675e8692fff6.tar.gz mpd-9fdf4b303d821b0730a77f4c4554675e8692fff6.tar.xz mpd-9fdf4b303d821b0730a77f4c4554675e8692fff6.zip |
Fixed list_window_check_selected().
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@876 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'list_window.c')
-rw-r--r-- | list_window.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/list_window.c b/list_window.c index d0fcaa58e..b251310be 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; } |