From 809f5f9606782da6ab07b96072df6d1a373060e1 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 17 Aug 2021 16:19:00 +0000 Subject: [PATCH] Set the right session if detach-on-destroy is off. --- usr.bin/tmux/server-fn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index f9b51dcf697..525f3613d6a 100644 --- a/usr.bin/tmux/server-fn.c +++ b/usr.bin/tmux/server-fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-fn.c,v 1.131 2021/08/13 06:52:51 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.132 2021/08/17 16:19:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -445,7 +445,7 @@ server_destroy_session(struct session *s) TAILQ_FOREACH(c, &clients, entry) { if (c->session != s) continue; - server_client_set_session(c, NULL); + server_client_set_session(c, s_new); if (s_new == NULL) c->flags |= CLIENT_EXIT; } -- 2.20.1