diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-10-08 17:53:11 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-10-08 17:53:11 +0000 |
| commit | 279341dd8e4fc6d3d32f058ccb886131c16c1078 (patch) | |
| tree | 3e4c55cbc91764376e99009655922895d7dab7e7 /render.c | |
| parent | changelog: fix CSI escape sequence (diff) | |
render: apply opacity correctly when in reverse video mode
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -403,7 +403,9 @@ render_cell(struct terminal *term, pixman_image_t *pix, pixman_color_t fg = color_hex_to_pixman(_fg); pixman_color_t bg = color_hex_to_pixman_with_alpha( - _bg, _bg == term->colors.bg ? term->colors.alpha : 0xffff); + _bg, + (_bg == (term->reverse ? term->colors.fg : term->colors.bg) + ? term->colors.alpha : 0xffff)); if (cell->attrs.dim) color_dim(&fg); @@ -549,8 +551,12 @@ render_margin(struct terminal *term, struct buffer *buf, const int line_count = end_line - start_line; uint32_t _bg = !term->reverse ? term->colors.bg : term->colors.fg; + pixman_color_t bg = color_hex_to_pixman_with_alpha( - _bg, _bg == term->colors.bg ? term->colors.alpha : 0xffff); + _bg, + (_bg == (term->reverse ? term->colors.fg : term->colors.bg) + ? term->colors.alpha : 0xffff)); + if (term->is_searching) color_dim(&bg); |
