Increase the escape delay when waiting for an RGB response no matter

when it is triggered (they can also be sent on resize). GitHub issue
4569.
This commit is contained in:
nicm
2025-09-01 07:58:09 +00:00
parent af36d7c430
commit cfb906a0ce
3 changed files with 38 additions and 19 deletions

View File

@ -937,7 +937,8 @@ partial_key:
delay = options_get_number(global_options, "escape-time");
if (delay == 0)
delay = 1;
if ((tty->flags & TTY_ALL_REQUEST_FLAGS) != TTY_ALL_REQUEST_FLAGS) {
if ((tty->flags & (TTY_WAITFG|TTY_WAITBG) ||
(tty->flags & TTY_ALL_REQUEST_FLAGS) != TTY_ALL_REQUEST_FLAGS)) {
log_debug("%s: increasing delay for active query", c->name);
if (delay < 500)
delay = 500;
@ -1686,14 +1687,14 @@ tty_keys_colours(struct tty *tty, const char *buf, size_t len, size_t *size,
else
log_debug("fg is %s", colour_tostring(n));
*fg = n;
tty->flags |= TTY_HAVEFG;
tty->flags &= ~TTY_WAITFG;
} else if (n != -1) {
if (c != NULL)
log_debug("%s bg is %s", c->name, colour_tostring(n));
else
log_debug("bg is %s", colour_tostring(n));
*bg = n;
tty->flags |= TTY_HAVEBG;
tty->flags &= ~TTY_WAITBG;
}
return (0);