summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/spawn.c')
-rw-r--r--usr.bin/tmux/spawn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/spawn.c b/usr.bin/tmux/spawn.c
index c19d7e37dea..c8bf91da939 100644
--- a/usr.bin/tmux/spawn.c
+++ b/usr.bin/tmux/spawn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spawn.c,v 1.22 2020/04/23 05:48:42 nicm Exp $ */
+/* $OpenBSD: spawn.c,v 1.23 2020/05/16 16:20:59 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -362,6 +362,7 @@ spawn_pane(struct spawn_context *sc, char **cause)
xasprintf(cause, "fork failed: %s", strerror(errno));
new_wp->fd = -1;
if (~sc->flags & SPAWN_RESPAWN) {
+ server_client_remove_pane(new_wp);
layout_close_pane(new_wp);
window_remove_pane(w, new_wp);
}