mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-18 05:34:02 -04:00
osc: merge OSC 10/11/12/17/19 handling
10/11/17/19 were already merged, so this patch just stops special casing 12 (cursor color). In preparation for XTPUSHCOLORS/XTPOPCOLORS, the cursor colors are moved from their own struct, into the 'colors' struct. Also fix a bug where OSC 17/19 queries returned OSC-11 data.
This commit is contained in:
parent
e708d19ea3
commit
5d4a002413
4 changed files with 33 additions and 58 deletions
10
terminal.c
10
terminal.c
|
|
@ -1221,6 +1221,8 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
|
|||
.fg = conf->colors.fg,
|
||||
.bg = conf->colors.bg,
|
||||
.alpha = conf->colors.alpha,
|
||||
.cursor_fg = conf->cursor.color.text,
|
||||
.cursor_bg = conf->cursor.color.cursor,
|
||||
.selection_fg = conf->colors.selection_fg,
|
||||
.selection_bg = conf->colors.selection_bg,
|
||||
.use_custom_selection = conf->colors.use_custom.selection,
|
||||
|
|
@ -1233,10 +1235,6 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
|
|||
.state = CURSOR_BLINK_ON,
|
||||
.fd = -1,
|
||||
},
|
||||
.cursor_color = {
|
||||
.text = conf->cursor.color.text,
|
||||
.cursor = conf->cursor.color.cursor,
|
||||
},
|
||||
.selection = {
|
||||
.coords = {
|
||||
.start = {-1, -1},
|
||||
|
|
@ -2035,6 +2033,8 @@ 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.cursor_fg = term->conf->cursor.color.text;
|
||||
term->colors.cursor_bg = term->conf->cursor.color.cursor;
|
||||
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;
|
||||
|
|
@ -2051,8 +2051,6 @@ term_reset(struct terminal *term, bool hard)
|
|||
term->cursor_blink.decset = false;
|
||||
term->cursor_blink.deccsusr = term->conf->cursor.blink.enabled;
|
||||
term_cursor_blink_update(term);
|
||||
term->cursor_color.text = term->conf->cursor.color.text;
|
||||
term->cursor_color.cursor = term->conf->cursor.color.cursor;
|
||||
selection_cancel(term);
|
||||
term->normal.offset = term->normal.view = 0;
|
||||
term->alt.offset = term->alt.view = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue