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);