diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-10-28 10:40:23 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-10-28 10:40:23 +0200 |
| commit | 184b7184dc2bc0b0340d94d3cc08678be98d1890 (patch) | |
| tree | 1ee1feb1f14405d7e5624cdec9185ac2b6ae276a /ui-curses.c | |
| parent | bfca750d06b565dfbe70536027eb951ede1e4d41 (diff) | |
| download | vis-184b7184dc2bc0b0340d94d3cc08678be98d1890.tar.gz vis-184b7184dc2bc0b0340d94d3cc08678be98d1890.tar.xz | |
ui: allow cursor line style to override cell attributes
Up until now only the background color could be changed.
Diffstat (limited to 'ui-curses.c')
| -rw-r--r-- | ui-curses.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui-curses.c b/ui-curses.c index dc38e2c..08e2bef 100644 --- a/ui-curses.c +++ b/ui-curses.c @@ -674,7 +674,8 @@ static void ui_window_draw(UiWin *w) { } short selection_bg = win->styles[UI_STYLE_SELECTION].bg; - short cursor_line_bg = win->styles[UI_STYLE_CURSOR_LINE].bg; + short cul_bg = win->styles[UI_STYLE_CURSOR_LINE].bg; + attr_t cul_attr = win->styles[UI_STYLE_CURSOR_LINE].attr; bool multiple_cursors = view_cursors_multiple(win->view); attr_t attr = A_NORMAL; @@ -699,7 +700,7 @@ static void ui_window_draw(UiWin *w) { 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)); + attr = cul_attr | (style->attr & ~A_COLOR) | COLOR_PAIR(color_pair_get(style->fg, cul_bg)); prev_style = NULL; } else if (style != prev_style) { attr = style_to_attr(style); |
