1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1000 B

--- st.c
+++ st.c
@@ -1848,21 +1850,22 @@ strhandle(void)
int j, narg, par;
term.esc &= ~(ESC_STR_END|ESC_STR);
- strparse();
- par = (narg = strescseq.narg) ? atoi(strescseq.args[0]) : 0;
+ strescseq.buf[strescseq.len] = '\0';
switch (strescseq.type) {
case ']': /* OSC -- Operating System Command */
+ strparse();
+ par = (narg = strescseq.narg) ? atoi(STRESCARGJUST(0)) : 0;
switch (par) {
case 0:
case 1:
case 2:
if (narg > 1)
- xsettitle(strescseq.args[1]);
+ xsettitle(STRESCARGREST(1));
return;
case 52:
if (narg > 2 && allowwindowops) {
- dec = base64dec(strescseq.args[2]);
+ dec = base64dec(STRESCARGJUST(2));
if (dec) {
xsetsel(dec);
xclipcopy();
@@ -1894,7 +1897,7 @@ strhandle(void)
}
break;
case 'k': /* old title set compatibility */
- xsettitle(strescseq.args[0]);
+ xsettitle(strescseq.buf);
return;
case 'P': /* DCS -- Device Control String */
case '_': /* APC -- Application Program Command */