summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-02-20 02:12:32 -0600
committerzachir <zachir@librem.one>2023-02-20 02:12:32 -0600
commitb317320ed62cf0a7e1aeade4a6d9a6f780d6c7e0 (patch)
treef80e1f8e9b0c11f371327411177c46ded04b1a8b /st.c
parentdb8eea792ac95be0d5a118480b296783bf774705 (diff)
add csi_22_23 patch
Diffstat (limited to 'st.c')
-rw-r--r--st.c36
1 files changed, 32 insertions, 4 deletions
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