If tmux receives a palette request (OSC 4) in a pane and the palette

entry has not been set, send a request to the most recently used client
and forward any response instead. Based on change from Tim Culverhouse
in GitHub issue 4665.
This commit is contained in:
nicm
2025-10-30 07:41:19 +00:00
parent 2c08960f4e
commit 1e61e52400
5 changed files with 340 additions and 48 deletions

View File

@@ -282,6 +282,7 @@ struct client *
server_client_create(int fd)
{
struct client *c;
u_int i;
setblocking(fd, 0);
@@ -315,6 +316,12 @@ server_client_create(int fd)
evtimer_set(&c->repeat_timer, server_client_repeat_timer, c);
evtimer_set(&c->click_timer, server_client_click_timer, c);
for (i = 0; i < INPUT_REQUEST_TYPES; i++) {
c->input_requests[i].c = c;
c->input_requests[i].type = i;
TAILQ_INIT(&c->input_requests[i].requests);
}
TAILQ_INSERT_TAIL(&clients, c, entry);
log_debug("new client %p", c);
return (c);
@@ -463,6 +470,7 @@ server_client_lost(struct client *c)
tty_term_free_list(c->term_caps, c->term_ncaps);
status_free(c);
input_cancel_requests(c);
free(c->title);
free((void *)c->cwd);