From b317320ed62cf0a7e1aeade4a6d9a6f780d6c7e0 Mon Sep 17 00:00:00 2001 From: zachir Date: Mon, 20 Feb 2023 02:12:32 -0600 Subject: add csi_22_23 patch --- st.c | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'st.c') diff --git a/st.c b/st.c index 130b4eb..34347ce 100644 --- a/st.c +++ b/st.c @@ -1810,6 +1810,33 @@ csihandle(void) goto unknown; } break; + case 't': /* title stack operations */ + switch (csiescseq.arg[0]) { + case 22: /* pust current title on stack */ + switch (csiescseq.arg[1]) { + case 0: + case 1: + case 2: + xpushtitle(); + break; + default: + goto unknown; + } + break; + case 23: /* pop last title from stack */ + switch (csiescseq.arg[1]) { + case 0: + case 1: + case 2: + xsettitle(NULL, 1); + break; + default: + goto unknown; + } + break; + default: + goto unknown; + } } } @@ -1888,7 +1915,7 @@ strhandle(void) switch (par) { case 0: if (narg > 1) { - xsettitle(strescseq.args[1]); + xsettitle(strescseq.args[1], 0); xseticontitle(strescseq.args[1]); } return; @@ -1898,7 +1925,7 @@ strhandle(void) return; case 2: if (narg > 1) - xsettitle(strescseq.args[1]); + xsettitle(strescseq.args[1], 0); return; case 52: if (narg > 2 && allowwindowops) { @@ -1955,7 +1982,7 @@ strhandle(void) } break; case 'k': /* old title set compatibility */ - xsettitle(strescseq.args[0]); + xsettitle(strescseq.args[0], 0); return; case 'P': /* DCS -- Device Control String */ case '_': /* APC -- Application Program Command */ @@ -2327,6 +2354,7 @@ eschandle(uchar ascii) break; case 'c': /* RIS -- Reset to initial state */ treset(); + xfreetitlestack(); resettitle(); xloadcols(); break; @@ -2613,7 +2641,7 @@ tresize(int col, int row) void resettitle(void) { - xsettitle(NULL); + xsettitle(NULL, 0); } void -- cgit v1.2.3