aboutsummaryrefslogtreecommitdiff
path: root/tty-keys.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2023-01-09 16:01:11 +0000
committerThomas Adam <thomas@xteddy.org>2023-01-09 16:01:11 +0000
commit9b1ea8b16d53a73c1dcd0ca020a45e9d1dd08ac6 (patch)
tree42ad851d0dfe817da1328dc7171d5ef738f52a20 /tty-keys.c
parent90512202434daa0c1c7d2d2d7fffd4f58ea7ab77 (diff)
parentb41892622de3a2383ff5b419364530f08223558e (diff)
downloadrtmux-9b1ea8b16d53a73c1dcd0ca020a45e9d1dd08ac6.tar.gz
rtmux-9b1ea8b16d53a73c1dcd0ca020a45e9d1dd08ac6.tar.bz2
rtmux-9b1ea8b16d53a73c1dcd0ca020a45e9d1dd08ac6.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tty-keys.c b/tty-keys.c
index d0199bb6..5677f133 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -1528,13 +1528,11 @@ tty_keys_colours(struct tty *tty, const char *buf, size_t len, size_t *size)
}
if (i == (sizeof tmp) - 1)
return (-1);
- if (tmp[i] == '\007') {
- *size = 5 + i;
- tmp[i] = '\0';
- } else {
- *size = 6 + i;
+ if (tmp[i - 1] == '\033')
tmp[i - 1] = '\0';
- }
+ else
+ tmp[i] = '\0';
+ *size = 6 + i;
n = colour_parseX11(tmp);
if (n != -1 && buf[3] == '0') {