From 43e3e5390861cebdc9f3c87ebf7ed1414cf9b596 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 24 Aug 2020 05:22:28 +0000 Subject: Do not run off end of string when stripping delays, reported by Dave Vandervies. --- tty-term.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tty-term.c') diff --git a/tty-term.c b/tty-term.c index 3ccff2ff..5aac1e0c 100644 --- a/tty-term.c +++ b/tty-term.c @@ -302,6 +302,8 @@ tty_term_strip(const char *s) ptr++; if (*ptr == '>') ptr++; + if (*ptr == '\0') + break; } buf[len++] = *ptr; -- cgit From c8f3736b07a0ae4c73bd6517ab8c8596d74c1c67 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 5 Oct 2020 09:53:01 +0000 Subject: Use the setal capability as well as (tmux's) Setulc. --- tty-term.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tty-term.c') diff --git a/tty-term.c b/tty-term.c index 5aac1e0c..9161ad01 100644 --- a/tty-term.c +++ b/tty-term.c @@ -245,6 +245,7 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_KUP6] = { TTYCODE_STRING, "kUP6" }, [TTYC_KUP7] = { TTYCODE_STRING, "kUP7" }, [TTYC_MS] = { TTYCODE_STRING, "Ms" }, + [TTYC_OL] = { TTYCODE_STRING, "ol" }, [TTYC_OP] = { TTYCODE_STRING, "op" }, [TTYC_REV] = { TTYCODE_STRING, "rev" }, [TTYC_RGB] = { TTYCODE_FLAG, "RGB" }, @@ -255,6 +256,7 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_RMKX] = { TTYCODE_STRING, "rmkx" }, [TTYC_SETAB] = { TTYCODE_STRING, "setab" }, [TTYC_SETAF] = { TTYCODE_STRING, "setaf" }, + [TTYC_SETAL] = { TTYCODE_STRING, "setal" }, [TTYC_SETRGBB] = { TTYCODE_STRING, "setrgbb" }, [TTYC_SETRGBF] = { TTYCODE_STRING, "setrgbf" }, [TTYC_SETULC] = { TTYCODE_STRING, "Setulc" }, -- cgit From d603dbdef007c879dfb812d569289119e61b4d3f Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 13 Oct 2020 07:29:24 +0000 Subject: Set RGB flag if capabilities are present, GitHub issue 2418. --- tty-term.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tty-term.c') diff --git a/tty-term.c b/tty-term.c index 9161ad01..b4feea60 100644 --- a/tty-term.c +++ b/tty-term.c @@ -578,6 +578,9 @@ tty_term_create(struct tty *tty, char *name, int *feat, int fd, char **cause) (!tty_term_has(term, TTYC_SETRGBF) || !tty_term_has(term, TTYC_SETRGBB))) tty_add_features(feat, "RGB", ","); + if (tty_term_has(term, TTYC_SETRGBF) && + tty_term_has(term, TTYC_SETRGBB)) + term->flags |= TERM_RGBCOLOURS; /* Apply the features and overrides again. */ tty_apply_features(term, *feat); -- cgit