mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-20 05:33:47 -04:00
Merge branch 'modify-bg-color-when-highlighted-text-has-same-fg-bg'
Closes #455
This commit is contained in:
commit
3131eb0288
2 changed files with 9 additions and 0 deletions
|
|
@ -33,6 +33,10 @@
|
||||||
* `generate-alt-random-writes.py --sixel`: width and height of emitted
|
* `generate-alt-random-writes.py --sixel`: width and height of emitted
|
||||||
sixels has been adjusted.
|
sixels has been adjusted.
|
||||||
* _Concealed_ text (`\E[8m`) is now revealed when highlighted.
|
* _Concealed_ text (`\E[8m`) is now revealed when highlighted.
|
||||||
|
* The background color of highlighted text is now adjusted, when the
|
||||||
|
foreground and background colors are the same, making the
|
||||||
|
highlighted text legible
|
||||||
|
(https://codeberg.org/dnkl/foot/issues/455).
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
|
||||||
5
render.c
5
render.c
|
|
@ -443,6 +443,11 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (unlikely(is_selected && _fg == _bg)) {
|
||||||
|
/* Invert bg when selected/highlighted text has same fg/bg */
|
||||||
|
_bg = ~_bg;
|
||||||
|
}
|
||||||
|
|
||||||
if (cell->attrs.dim)
|
if (cell->attrs.dim)
|
||||||
_fg = color_dim(_fg);
|
_fg = color_dim(_fg);
|
||||||
if (term->conf->bold_in_bright.enabled && cell->attrs.bold)
|
if (term->conf->bold_in_bright.enabled && cell->attrs.bold)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue