csi: implement CSI 22t and CSI 23t

22;0|1|2t pushes the current window title/icon to the stack, while 23
pops it.

The second parameter, 0|1|2 has the following meaning:

0 - push/pop icon+title
1 - push/pop icon
2 - push/pop title
This commit is contained in:
Daniel Eklöf 2019-07-21 17:48:06 +02:00
parent 97350f6488
commit 64135ae365
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 38 additions and 6 deletions

3
main.c
View file

@ -324,6 +324,7 @@ main(int argc, char *const *argv)
.cursor_keys_mode = CURSOR_KEYS_NORMAL,
.keypad_keys_mode = KEYPAD_NUMERICAL,
.auto_margin = true,
.window_title_stack = tll_init(),
.vt = {
.state = 1, /* STATE_GROUND */
.attrs = {
@ -848,7 +849,9 @@ out:
for (int row = 0; row < term.alt.num_rows; row++)
grid_row_free(term.alt.rows[row]);
free(term.alt.rows);
free(term.window_title);
tll_free_and_free(term.window_title_stack, free);
for (size_t i = 0; i < sizeof(term.fonts) / sizeof(term.fonts[0]); i++) {
struct font *f = &term.fonts[i];