diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-06-07 19:46:46 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-06-08 17:51:13 +0000 |
| commit | 39560a6ff1b398ec814c8e08fd694ea9ed4abad8 (patch) | |
| tree | 0dac0c89d29f760d120a4d3b462fee3d72132249 /render.c | |
| parent | vt: \E#8: print ‘E’ using the default attributes (diff) | |
render: reverse video only swaps *default* fg/bg
This matches XTerm behavior, and fixes vttest 11.6.6.2:
Test non-VT100 ->
Test ISO-6429 colors ->
Test of VT102-style features with BCE ->
Test of screen features
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -377,7 +377,7 @@ cursor_colors_for_cell(const struct terminal *term, const struct cell *cell, term->cursor_color.text >> 31 ? term->cursor_color.text : term->colors.bg); - if (term->reverse ^ cell->attrs.reverse ^ is_selected) { + if (cell->attrs.reverse ^ is_selected) { pixman_color_t swap = *cursor_color; *cursor_color = *text_color; *text_color = swap; @@ -461,10 +461,10 @@ render_cell(struct terminal *term, pixman_image_t *pix, _bg = term->colors.selection_bg; } else { /* Use cell specific color, if set, otherwise the default colors (possible reversed) */ - _fg = cell->attrs.have_fg ? cell->attrs.fg : term->colors.fg; - _bg = cell->attrs.have_bg ? cell->attrs.bg : term->colors.bg; + _fg = cell->attrs.have_fg ? cell->attrs.fg : term->reverse ? term->colors.bg : term->colors.fg; + _bg = cell->attrs.have_bg ? cell->attrs.bg : term->reverse ? term->colors.fg : term->colors.bg; - if (term->reverse ^ cell->attrs.reverse ^ is_selected) { + if (cell->attrs.reverse ^ is_selected) { uint32_t swap = _fg; _fg = _bg; _bg = swap; |
