summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-join-pane.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-07-04 14:24:02 +0000
committernicm <nicm@openbsd.org>2020-07-04 14:24:02 +0000
commitfedaf9c87b9e2f29ceb59c1080900e7c6e537cc2 (patch)
treee5ee7de9fcfc90f0b1c7018e5fe7a5d869236c8b /usr.bin/tmux/cmd-join-pane.c
parentSmall XXX. (diff)
downloadwireguard-openbsd-fedaf9c87b9e2f29ceb59c1080900e7c6e537cc2.tar.xz
wireguard-openbsd-fedaf9c87b9e2f29ceb59c1080900e7c6e537cc2.zip
kill-window -a cannot just walk the list of windows because if
renumber-windows is on, the window it wants to keep could be moved. Change to renumber afterwards and also behave better if the window is linked into the session twice. GitHub issue 2287.
Diffstat (limited to 'usr.bin/tmux/cmd-join-pane.c')
-rw-r--r--usr.bin/tmux/cmd-join-pane.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-join-pane.c b/usr.bin/tmux/cmd-join-pane.c
index 082897cc708..e550b5882b5 100644
--- a/usr.bin/tmux/cmd-join-pane.c
+++ b/usr.bin/tmux/cmd-join-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-join-pane.c,v 1.45 2020/05/16 16:20:59 nicm Exp $ */
+/* $OpenBSD: cmd-join-pane.c,v 1.46 2020/07/04 14:24:02 nicm Exp $ */
/*
* Copyright (c) 2011 George Nachman <tmux@georgester.com>
@@ -160,7 +160,7 @@ cmd_join_pane_exec(struct cmd *self, struct cmdq_item *item)
server_status_session(dst_s);
if (window_count_panes(src_w) == 0)
- server_kill_window(src_w);
+ server_kill_window(src_w, 1);
else
notify_window("window-layout-changed", src_w);
notify_window("window-layout-changed", dst_w);