vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit f8b3cbef3fc6af265571833b4699cbb3dabf0428 parent 42bc1c73ab065b46e50c9859f13f5ccdf8ca54c5 Author: Marc André Tanner <mat@brain-dump.org> Date: Mon, 19 Oct 2015 22:06:38 +0200 ui: make default selection visible Diffstat:
| M | ui-curses.c | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git 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));