aboutsummaryrefslogtreecommitdiffstats
path: root/src/list_window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/list_window.c')
-rw-r--r--src/list_window.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/list_window.c b/src/list_window.c
index 84c19a1c1..b541ac708 100644
--- a/src/list_window.c
+++ b/src/list_window.c
@@ -166,15 +166,22 @@ list_window_paint(list_window_t *lw,
int i;
int fill = options.wide_cursor;
- while( lw->selected < lw->start )
+ if( lw->flags & LW_HIDE_CURSOR )
{
- lw->start--;
- lw->clear=1;
+ lw->selected = -1;
}
- while( lw->selected >= lw->start+lw->rows )
+ else
{
- lw->start++;
- lw->clear=1;
+ while( lw->selected < lw->start )
+ {
+ lw->start--;
+ lw->clear=1;
+ }
+ while( lw->selected >= lw->start+lw->rows )
+ {
+ lw->start++;
+ lw->clear=1;
+ }
}
for(i=0; i<lw->rows; i++)