aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2019-09-10 19:35:34 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2019-09-16 09:00:08 +0100
commit846d57e1b80e78416e0b82d59839eef8b8aea6f2 (patch)
treed382750df167cf82153635afc15a92ec7a46b454
parent54670d898fd010831b785d003421fef847de6776 (diff)
downloadrtmux-846d57e1b80e78416e0b82d59839eef8b8aea6f2.tar.gz
rtmux-846d57e1b80e78416e0b82d59839eef8b8aea6f2.tar.bz2
rtmux-846d57e1b80e78416e0b82d59839eef8b8aea6f2.zip
Make client exit if pane where input is going is closed.
-rw-r--r--window.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/window.c b/window.c
index 409f1df5..254ccc83 100644
--- a/window.c
+++ b/window.c
@@ -1551,6 +1551,10 @@ window_pane_input_callback(struct client *c, int closed, void *data)
wp = window_pane_find_by_id(cdata->wp);
if (wp == NULL || closed || c->flags & CLIENT_DEAD) {
+ if (wp == NULL)
+ c->flags |= CLIENT_EXIT;
+ evbuffer_drain(evb, len);
+
c->stdin_callback = NULL;
server_client_unref(c);