summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
diff options
context:
space:
mode:
authornicm <nicm>2023-09-02 20:03:10 +0000
committernicm <nicm>2023-09-02 20:03:10 +0000
commitc767d62329597b9152c0e1b33ba2656be8e0bced (patch)
tree7c77bac80c8bb111081a3e64d2b93c797b459a59 /tty-keys.c
parentd209fe9b1ef5cf135f86058942e3caa6f998038c (diff)
Request terminal colours again on SIGWINCH but at most once every 30
seconds, GitHub issue 3582.
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/tty-keys.c b/tty-keys.c
index e3000e5a..de5dd8f2 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -1492,8 +1492,6 @@ tty_keys_colours(struct tty *tty, const char *buf, size_t len, size_t *size)
int n;
*size = 0;
- if ((tty->flags & TTY_HAVEFG) && (tty->flags & TTY_HAVEBG))
- return (-1);
/* First four bytes are always \033]1 and 0 or 1 and ;. */
if (buf[0] != '\033')
@@ -1539,11 +1537,9 @@ tty_keys_colours(struct tty *tty, const char *buf, size_t len, size_t *size)
if (n != -1 && buf[3] == '0') {
log_debug("%s: foreground is %s", c->name, colour_tostring(n));
tty->fg = n;
- tty->flags |= TTY_HAVEFG;
} else if (n != -1) {
log_debug("%s: background is %s", c->name, colour_tostring(n));
tty->bg = n;
- tty->flags |= TTY_HAVEBG;
}
return (0);