aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-07-15 16:24:27 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-07-15 16:24:27 +0000
commite259f460f3f39d67be2bd6a218d0348fa73a2e02 (patch)
treebd998230bdd82684605ee84484b106df689e4ff2
parentrender: track alpha directly, rather whether to use it or not (diff)
render: margins: use correct background color
* Sync actual color used, with how render_cell() selects the background color * Use color_dim_for_search(), not color_dim()
-rw-r--r--render.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/render.c b/render.c
index 7dcad297..b404f2f5 100644
--- a/render.c
+++ b/render.c
@@ -815,13 +815,10 @@ 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;
- if (term->is_searching)
- _bg = color_dim(_bg);
+ pixman_color_t bg = color_hex_to_pixman_with_alpha(_bg, term->colors.alpha);
- pixman_color_t bg = color_hex_to_pixman_with_alpha(
- _bg,
- (_bg == (term->reverse ? term->colors.fg : term->colors.bg)
- ? term->colors.alpha : 0xffff));
+ if (term->is_searching)
+ color_dim_for_search(&bg);
pixman_image_fill_rectangles(
PIXMAN_OP_SRC, buf->pix[0], &bg, 4,