osc7: initial patch implementation (#154)
* osc7: initial patch implementation Closes #153 * osc7: avoid redundant use of realpath() * osc7: fix styling * Changing position of the OSC7_PATCH toggle in patches.def.h --------- Co-authored-by: Bakkeby <bakkeby@gmail.com>
This commit is contained in:
parent
3f1a5ed034
commit
c4c5113fbd
9 changed files with 136 additions and 11 deletions
18
st.c
18
st.c
|
|
@ -2654,6 +2654,11 @@ strhandle(void)
|
|||
}
|
||||
}
|
||||
return;
|
||||
#if OSC7_PATCH
|
||||
case 7:
|
||||
osc7parsecwd((const char *)strescseq.args[1]);
|
||||
return;
|
||||
#endif // OSC7_PATCH
|
||||
case 8: /* Clear Hyperlinks */
|
||||
return;
|
||||
case 10:
|
||||
|
|
@ -2856,6 +2861,19 @@ strparse(void)
|
|||
if (*p == '\0')
|
||||
return;
|
||||
|
||||
/* preserve semicolons in window titles, icon names and OSC 7 sequences */
|
||||
if (strescseq.type == ']' && (
|
||||
p[0] <= '2'
|
||||
#if OSC7_PATCH
|
||||
|| p[0] == '7'
|
||||
#endif // OSC7_PATCH
|
||||
) && p[1] == ';') {
|
||||
strescseq.args[strescseq.narg++] = p;
|
||||
strescseq.args[strescseq.narg++] = p + 2;
|
||||
p[1] = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
while (strescseq.narg < STR_ARG_SIZ) {
|
||||
strescseq.args[strescseq.narg++] = p;
|
||||
while ((c = *p) != ';' && c != '\0')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue