osc: implement OSC 17+19: change selection background/foreground colors

And of course, we also implement the corresponding reset sequences,
OSC 117+119.
This commit is contained in:
Daniel Eklöf 2021-04-07 08:09:40 +02:00
parent deb08ddba0
commit 55b343f690
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 67 additions and 13 deletions

View file

@ -416,9 +416,9 @@ render_cell(struct terminal *term, pixman_image_t *pix,
uint32_t _fg = 0;
uint32_t _bg = 0;
if (is_selected && term->conf->colors.use_custom.selection) {
_fg = term->conf->colors.selection_fg;
_bg = term->conf->colors.selection_bg;
if (is_selected && term->colors.use_custom_selection) {
_fg = term->colors.selection_fg;
_bg = term->colors.selection_bg;
} else {
/* Use cell specific color, if set, otherwise the default colors (possible reversed) */
_fg = cell->attrs.have_fg ? cell->attrs.fg : term->colors.fg;