diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-10-19 22:06:38 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-11-08 13:37:23 +0100 |
| commit | 6eb3dbc60f054c81ef071c79b0f438cdd0bbb1f1 (patch) | |
| tree | 082cbecc96007efbe1ec2d7202fac6694ae56d9c /ui-curses.c | |
| parent | 2c419e920660601b5b9bd1d9cead9d45d56fa289 (diff) | |
| download | vis-6eb3dbc60f054c81ef071c79b0f438cdd0bbb1f1.tar.gz vis-6eb3dbc60f054c81ef071c79b0f438cdd0bbb1f1.tar.xz | |
ui: make default selection visible
Diffstat (limited to 'ui-curses.c')
| -rw-r--r-- | ui-curses.c | 5 |
1 files changed, 4 insertions, 1 deletions
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)); |
