mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05: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;
|
||||
|
||||
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
|
||||
? cell->attrs.background : term->background;
|
||||
|
||||
if (term->reverse) {
|
||||
struct rgba swap = foreground;
|
||||
foreground = background;
|
||||
background = swap;
|
||||
}
|
||||
? cell->attrs.background
|
||||
: !term->reverse ? term->background : term->foreground;
|
||||
|
||||
if (has_cursor) {
|
||||
struct rgba swap = foreground;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue