From 4283e96865e79977f446b762733da47c829301bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 22 Oct 2020 18:41:47 +0200 Subject: [PATCH] render: blink switches between foreground and dimmed foreground --- CHANGELOG.md | 5 +++++ render.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5e7a719..a0cb347f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,11 @@ ### Changed + +* Blinking text now uses the foreground color, but dimmed down in its + off state, instead of the background color. + + ### Deprecated ### Removed ### Fixed diff --git a/render.c b/render.c index 2d15fb81..fa9a967b 100644 --- a/render.c +++ b/render.c @@ -399,9 +399,6 @@ render_cell(struct terminal *term, pixman_image_t *pix, } } - if (cell->attrs.blink && term->blink.state == BLINK_OFF) - _fg = _bg; - pixman_color_t fg = color_hex_to_pixman(_fg); pixman_color_t bg = color_hex_to_pixman_with_alpha( _bg, @@ -411,6 +408,9 @@ render_cell(struct terminal *term, pixman_image_t *pix, if (cell->attrs.dim) color_dim(&fg); + if (cell->attrs.blink && term->blink.state == BLINK_OFF) + color_dim(&fg); + if (term->is_searching && !is_selected) { color_dim_for_search(&fg); color_dim_for_search(&bg);