summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2019-09-10 19:35:34 +0000
committernicm <nicm>2019-09-10 19:35:34 +0000
commit0feae4d8ae4190b89f486fddab10a691cc7a8fd3 (patch)
treec5cade75c63ba548ff45b40eb319e16ddaccfe5a
parent4b7e97ba533161e6130b957b91c9bb6aa3da7afa (diff)
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 0b691197..e3b20a3e 100644
--- a/window.c
+++ b/window.c
@@ -1572,6 +1572,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);