aboutsummaryrefslogtreecommitdiffstats
path: root/list_window.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-04-14 20:27:18 +0000
committerKalle Wallin <kaw@linux.se>2004-04-14 20:27:18 +0000
commit2d2600395b298dabd2e920c5be3d6b7fc99db54a (patch)
treebabb035fd2b36e3825841cacd88b117bc900316c /list_window.c
parent937207a84c32e2db4e6257beadc8a7e968c07f61 (diff)
downloadmpd-2d2600395b298dabd2e920c5be3d6b7fc99db54a.tar.gz
mpd-2d2600395b298dabd2e920c5be3d6b7fc99db54a.tar.xz
mpd-2d2600395b298dabd2e920c5be3d6b7fc99db54a.zip
Added optional support for a wide_cursor.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@760 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'list_window.c')
-rw-r--r--list_window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/list_window.c b/list_window.c
index c086fca57..5a07f603f 100644
--- a/list_window.c
+++ b/list_window.c
@@ -5,6 +5,7 @@
#include <ncurses.h>
#include "config.h"
+#include "options.h"
#include "support.h"
#include "command.h"
#include "list_window.h"
@@ -118,6 +119,7 @@ list_window_paint(list_window_t *lw,
void *callback_data)
{
int i;
+ int fill = options.wide_cursor;
while( lw->selected < lw->start )
{
@@ -137,7 +139,7 @@ list_window_paint(list_window_t *lw,
label = (callback) (lw->start+i, &highlight, callback_data);
wmove(lw->w, i, 0);
- if( lw->clear )
+ if( lw->clear && (!fill || !label) )
wclrtoeol(lw->w);
if( label )
{
@@ -147,6 +149,8 @@ list_window_paint(list_window_t *lw,
wattron(lw->w, A_REVERSE);
waddnstr(lw->w, label, lw->cols-1);
+ if( fill )
+ mvwhline(lw->w, i, strlen(label), ' ', lw->cols-1);
if( highlight )
wattroff(lw->w, A_BOLD);