summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authornicm <nicm>2021-10-07 07:52:13 +0000
committernicm <nicm>2021-10-07 07:52:13 +0000
commit95744963335389d670997fe943c0859449eddc3e (patch)
tree7b48185c6b43ab0113cfed7eb6a39e2c969e4218 /window.c
parent5359b766195528b9a0763c7f5e4ce5f2797a9b09 (diff)
Handle splitw -I correctly when used from an attached client, GitHub
issue 2917.
Diffstat (limited to 'window.c')
-rw-r--r--window.c6
1 files changed, 5 insertions, 1 deletions
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;