diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-10-07 07:52:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-10-07 07:52:14 +0000 |
commit | 22a4cd0a1a2178ecb90b8841cf8338e7097c3234 (patch) | |
tree | 48c1900d42ac468976b3a1b4c2dcf97b06a17afa /usr.bin/tmux/window.c | |
parent | 43e009eed42a65f9242b8ca7a8e5c506b0e5bcae (diff) |
Handle splitw -I correctly when used from an attached client, GitHub
issue 2917.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r-- | usr.bin/tmux/window.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index 4d0c9e2bcc2..e4a45ce7535 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.276 2021/08/27 17:15:57 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.277 2021/10/07 07:52:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1527,7 +1527,7 @@ window_pane_input_callback(struct client *c, __unused const char *path, size_t len = EVBUFFER_LENGTH(buffer); wp = window_pane_find_by_id(cdata->wp); - if (wp == NULL || closed || error != 0 || c->flags & CLIENT_DEAD) { + if (wp == NULL || closed || error != 0 || (c->flags & CLIENT_DEAD)) { if (wp == NULL) c->flags |= CLIENT_EXIT; @@ -1553,6 +1553,10 @@ window_pane_start_input(struct window_pane *wp, struct cmdq_item *item, *cause = xstrdup("pane is not empty"); return (-1); } + if (c->flags & (CLIENT_DEAD|CLIENT_EXITED)) + return (1); + if (c->session != NULL) + return (1); cdata = xmalloc(sizeof *cdata); cdata->item = item; |