summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorAiden Gall <aiden@aidengall.xyz>2024-05-14 13:49:58 +0100
committerAiden Gall <aiden@aidengall.xyz>2024-05-14 13:49:58 +0100
commit6b1898dce6eb8bb32391a833f03abcf9404b9e5b (patch)
tree7a9e111209f9094dd6f957c8e5207cd5e5b455c7 /st.c
parent9d8cc9f05e1cd2bb2d324bb57c38dba3236141b7 (diff)
parent5dbcca49263be094fc38159c297458ae323ef647 (diff)
merge upstream
Diffstat (limited to 'st.c')
-rw-r--r--st.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/st.c b/st.c
index 8ded428..b9e6d7a 100644
--- a/st.c
+++ b/st.c
@@ -1355,6 +1355,7 @@ csiparse(void)
{
char *p = csiescseq.buf, *np;
long int v;
+ int sep = ';'; /* colon or semi-colon, but not both */
csiescseq.narg = 0;
if (*p == '?') {
@@ -1372,7 +1373,9 @@ csiparse(void)
v = -1;
csiescseq.arg[csiescseq.narg++] = v;
p = np;
- if (*p != ';' || csiescseq.narg == ESC_ARG_SIZ)
+ if (sep == ';' && *p == ':')
+ sep = ':'; /* allow override to colon once */
+ if (*p != sep || csiescseq.narg == ESC_ARG_SIZ)
break;
p++;
}