summaryrefslogtreecommitdiffstats
path: root/tty-term.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2018-10-08 19:42:55 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2018-10-08 19:42:55 +0100
commit018f1b8a803f15910781dc9894fbd168cfa50943 (patch)
tree49f1f4e418bc04a3ba0bd599146286160e886a8a /tty-term.c
parent4b9e76aaaa2dffc01a796fe2ee6edafdfce814a9 (diff)
Use :: for escaping : in terminal-overrides not \:.
Diffstat (limited to 'tty-term.c')
-rw-r--r--tty-term.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tty-term.c b/tty-term.c
index 7e0fdb37..b43fe06e 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -312,10 +312,13 @@ tty_term_override_next(const char *s, size_t *offset)
if (s[at] == '\0')
return (NULL);
- while (s[at] != '\0' && s[at] != ':') {
- if (s[at] == '\\' && s[at + 1] == ':') {
- value[n++] = ':';
- at += 2;
+ while (s[at] != '\0') {
+ if (s[at] == ':') {
+ if (s[at + 1] == ':') {
+ value[n++] = ':';
+ at += 2;
+ } else
+ break;
} else {
value[n++] = s[at];
at++;