Add an option :opt:cursor_text_color to render text under the cursor in a fixed color.

See #126
This commit is contained in:
Kovid Goyal
2018-07-12 12:50:42 +05:30
parent d6a603d536
commit 55fc5c4358
5 changed files with 37 additions and 5 deletions

View File

@@ -5,6 +5,7 @@
#define REVERSE_SHIFT {REVERSE_SHIFT}
#define STRIKE_SHIFT {STRIKE_SHIFT}
#define DIM_SHIFT {DIM_SHIFT}
#define CURSOR_TEXT_COLOR {CURSOR_TEXT_COLOR}
// Inputs {{{
layout(std140) uniform CellRenderData {
@@ -166,8 +167,8 @@ void main() {
strike_pos = to_sprite_pos(pos, ((text_attrs >> STRIKE_SHIFT) & ONE) * FOUR, ZERO, ZERO);
// Cursor
foreground = choose_color(cursor, bg, foreground);
decoration_fg = choose_color(cursor, bg, decoration_fg);
foreground = choose_color(cursor, CURSOR_TEXT_COLOR, foreground);
decoration_fg = choose_color(cursor, CURSOR_TEXT_COLOR, decoration_fg);
#endif
// }}}