summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-swap-pane.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-swap-pane.c')
-rw-r--r--usr.bin/tmux/cmd-swap-pane.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-swap-pane.c b/usr.bin/tmux/cmd-swap-pane.c
index 6b1dcf11494..04fc89ac84a 100644
--- a/usr.bin/tmux/cmd-swap-pane.c
+++ b/usr.bin/tmux/cmd-swap-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-swap-pane.c,v 1.37 2020/04/13 10:59:58 nicm Exp $ */
+/* $OpenBSD: cmd-swap-pane.c,v 1.38 2020/05/16 16:20:59 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -79,6 +79,9 @@ cmd_swap_pane_exec(struct cmd *self, struct cmdq_item *item)
if (src_wp == dst_wp)
goto out;
+ server_client_remove_pane(src_wp);
+ server_client_remove_pane(dst_wp);
+
tmp_wp = TAILQ_PREV(dst_wp, window_panes, entry);
TAILQ_REMOVE(&dst_w->panes, dst_wp, entry);
TAILQ_REPLACE(&src_w->panes, src_wp, dst_wp, entry);