mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-29 07:58:01 -04:00
render: reverse video only reverses the default background/foreground
This commit is contained in:
parent
b26e03fced
commit
77e349d20d
1 changed files with 4 additions and 8 deletions
12
render.c
12
render.c
|
|
@ -88,15 +88,11 @@ grid_render_update(struct terminal *term, struct buffer *buf, const struct damag
|
||||||
int height = term->cell_height;
|
int height = term->cell_height;
|
||||||
|
|
||||||
struct rgba foreground = cell->attrs.have_foreground
|
struct rgba foreground = cell->attrs.have_foreground
|
||||||
? cell->attrs.foreground : term->foreground;
|
? cell->attrs.foreground
|
||||||
|
: !term->reverse ? term->foreground : term->background;
|
||||||
struct rgba background = cell->attrs.have_background
|
struct rgba background = cell->attrs.have_background
|
||||||
? cell->attrs.background : term->background;
|
? cell->attrs.background
|
||||||
|
: !term->reverse ? term->background : term->foreground;
|
||||||
if (term->reverse) {
|
|
||||||
struct rgba swap = foreground;
|
|
||||||
foreground = background;
|
|
||||||
background = swap;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (has_cursor) {
|
if (has_cursor) {
|
||||||
struct rgba swap = foreground;
|
struct rgba swap = foreground;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue