From 03fd2560e83443e09f4af1ae25e553e64bc476d1 Mon Sep 17 00:00:00 2001 From: Roman Zhuravlev Date: Sat, 18 Oct 2025 17:34:20 +0500 Subject: [PATCH] fix: if text is selected, brighten the background color instead of the foreground --- render.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/render.c b/render.c index 1d0f08af..9ee7a4b8 100644 --- a/render.c +++ b/render.c @@ -839,8 +839,13 @@ render_cell(struct terminal *term, pixman_image_t *pix, if (cell->attrs.dim) _fg = color_dim(term, _fg); - if (term->conf->bold_in_bright.enabled && cell->attrs.bold) - _fg = color_brighten(term, _fg); + if (term->conf->bold_in_bright.enabled && cell->attrs.bold) { + if (cell->attrs.reverse ^ is_selected) { + _bg = color_brighten(term, _bg); + } else { + _fg = color_brighten(term, _fg); + } + } if (cell->attrs.blink && term->blink.state == BLINK_OFF) _fg = color_blend_towards(_fg, 0x00000000, term->conf->dim.amount);