From: Max Kellermann Date: Sat, 10 Oct 2009 16:05:32 +0000 (+0200) Subject: list_window: fully disable highlighting code on --enable-mini X-Git-Tag: release-0.16~134 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cc17dcad34c4b6c42a9a73564c537443360ee079;p=ncmpc.git list_window: fully disable highlighting code on --enable-mini --- diff --git a/src/list_window.c b/src/list_window.c index 2a7db36..10e0629 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -378,6 +378,7 @@ list_window_paint_row(WINDOW *w, unsigned y, unsigned width, #ifdef NCMPC_MINI second_column = NULL; + highlight = false; #endif /* NCMPC_MINI */ if (second_column != NULL) { @@ -429,15 +430,14 @@ list_window_paint(const struct list_window *lw, { unsigned i; bool show_cursor = !lw->hide_cursor; - bool highlight = false; show_cursor = show_cursor && (!options.hardware_cursor || lw->range_selection); for (i = 0; i < lw->rows; i++) { const char *label; + bool highlight = false; char *second_column = NULL; - highlight = false; wmove(lw->w, i, 0); @@ -449,6 +449,11 @@ list_window_paint(const struct list_window *lw, label = callback(lw->start + i, &highlight, &second_column, callback_data); assert(label != NULL); +#ifdef NCMPC_MINI + highlight = false; + second_column = NULL; +#endif /* NCMPC_MINI */ + list_window_paint_row(lw->w, i, lw->cols, show_cursor && lw->start + i >= lw->selected_start &&