From 6eb3dbc60f054c81ef071c79b0f438cdd0bbb1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 19 Oct 2015 22:06:38 +0200 Subject: ui: make default selection visible --- ui-curses.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui-curses.c b/ui-curses.c index c336067..af5057e 100644 --- a/ui-curses.c +++ b/ui-curses.c @@ -669,7 +669,10 @@ static void ui_window_draw(UiWin *w) { attr = style_to_attr(&win->styles[UI_STYLE_CURSOR]); prev_style = NULL; } else if (l->cells[x].selected) { - attr = style->attr | COLOR_PAIR(color_pair_get(style->fg, selection_bg)); + if (style->fg == selection_bg) + attr = style_to_attr(&win->styles[UI_STYLE_SELECTION]); + else + attr = style->attr | COLOR_PAIR(color_pair_get(style->fg, selection_bg)); prev_style = NULL; } else if (cursor_line) { attr = style->attr | COLOR_PAIR(color_pair_get(style->fg, cursor_line_bg)); -- cgit v1.2.3