diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-07-13 08:19:53 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-07-13 08:30:23 +0000 |
| commit | c46c124363fad6dabd8328bdf8e15e5da8fabf7e (patch) | |
| tree | 13907132e075f97ac95f396595c9a38d522fa386 /render.c | |
| parent | themes: add nvim-dark and nvim-light themes (diff) | |
render: cursor: use default fg/bg if cell fg/bg are the same
When deciding which colors to use for the cursor, and the cursor text
and background colors are the same, use the default fg/bg instead.
Closes #1761
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -573,6 +573,14 @@ cursor_colors_for_cell(const struct terminal *term, const struct cell *cell, *text_color = color_hex_to_pixman(term->colors.bg); } } + + if (text_color->red == cursor_color->red && + text_color->green == cursor_color->green && + text_color->blue == cursor_color->blue) + { + *text_color = color_hex_to_pixman(term->colors.bg); + *cursor_color = color_hex_to_pixman(term->colors.fg); + } } static void |
