From 95744963335389d670997fe943c0859449eddc3e Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 7 Oct 2021 07:52:13 +0000 Subject: Handle splitw -I correctly when used from an attached client, GitHub issue 2917. --- window.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'window.c') diff --git a/window.c b/window.c index 64d75d43..d7fc3bf4 100644 --- a/window.c +++ b/window.c @@ -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; -- cgit v1.2.3