aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--render.c9
2 files changed, 12 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3022836d..3546d92e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -91,9 +91,13 @@
* Crash when a sixel image exceeds the current sixel max height.
* Crash after reverse-scrolling (`CSI Ps T`) in the ‘normal’
(non-alternate) screen ([#1190][1190]).
+* Background transparency being applied to the text "behind" the
+ cursor. Only applies to block cursor using inversed fg/bg
+ colors. ([#1205][1205]).
[1173]: https://codeberg.org/dnkl/foot/issues/1173
[1190]: https://codeberg.org/dnkl/foot/issues/1190
+[1205]: https://codeberg.org/dnkl/foot/issues/1205
### Security
diff --git a/render.c b/render.c
index 76f4b7c6..822667ae 100644
--- a/render.c
+++ b/render.c
@@ -419,7 +419,14 @@ cursor_colors_for_cell(const struct terminal *term, const struct cell *cell,
}
} else {
*cursor_color = *fg;
- *text_color = *bg;
+
+ if (unlikely(text_color->alpha != 0xffff)) {
+ /* We *know* this only happens when bg is the default bg
+ * color */
+ *text_color = color_hex_to_pixman(
+ term->reverse ? term->colors.fg : term->colors.bg);
+ } else
+ *text_color = *bg;
}
}