aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-04-07 06:09:40 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-04-08 08:43:36 +0000
commit55b343f69030c22fcd36b88d2af445acdd69b732 (patch)
treec819d9c96dcf1ed1df9310b0abe40217e1416502 /terminal.c
parentMerge branch 'osc-11-alpha' (diff)
osc: implement OSC 17+19: change selection background/foreground colors
And of course, we also implement the corresponding reset sequences, OSC 117+119.
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/terminal.c b/terminal.c
index fd206090..c05eb84e 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1087,6 +1087,9 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
.fg = conf->colors.fg,
.bg = conf->colors.bg,
.alpha = conf->colors.alpha,
+ .selection_fg = conf->colors.selection_fg,
+ .selection_bg = conf->colors.selection_bg,
+ .use_custom_selection = conf->colors.use_custom.selection,
},
.origin = ORIGIN_ABSOLUTE,
.cursor_style = conf->cursor.style,
@@ -1683,6 +1686,9 @@ term_reset(struct terminal *term, bool hard)
term->colors.fg = term->conf->colors.fg;
term->colors.bg = term->conf->colors.bg;
term->colors.alpha = term->conf->colors.alpha;
+ term->colors.selection_fg = term->conf->colors.selection_fg;
+ term->colors.selection_bg = term->conf->colors.selection_bg;
+ term->colors.use_custom_selection = term->conf->colors.use_custom.selection;
memcpy(term->colors.table, term->conf->colors.table,
sizeof(term->colors.table));
term->origin = ORIGIN_ABSOLUTE;