From 64135ae365b55d207bc071738f0a90b71becb435 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 21 Jul 2019 17:48:06 +0200 Subject: 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 --- main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index f2d03171..2ec17618 100644 --- a/main.c +++ b/main.c @@ -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]; -- cgit v1.3