mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Add a third state "all" to allow-passthrough to work even in invisible
panes, from Sergei Grechanik in GitHub issue 3274.
This commit is contained in:
21
tty.c
21
tty.c
@ -1626,13 +1626,20 @@ tty_write(void (*cmdfn)(struct tty *, const struct tty_ctx *),
|
||||
if (ctx->set_client_cb == NULL)
|
||||
return;
|
||||
TAILQ_FOREACH(c, &clients, entry) {
|
||||
if (!tty_client_ready(c))
|
||||
continue;
|
||||
state = ctx->set_client_cb(ctx, c);
|
||||
if (state == -1)
|
||||
break;
|
||||
if (state == 0)
|
||||
continue;
|
||||
if (ctx->allow_invisible_panes) {
|
||||
if (c->session == NULL ||
|
||||
c->tty.term == NULL ||
|
||||
c->flags & CLIENT_SUSPENDED)
|
||||
continue;
|
||||
} else {
|
||||
if (!tty_client_ready(c))
|
||||
continue;
|
||||
state = ctx->set_client_cb(ctx, c);
|
||||
if (state == -1)
|
||||
break;
|
||||
if (state == 0)
|
||||
continue;
|
||||
}
|
||||
cmdfn(&c->tty, ctx);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user