From 1affafef38f7f08ff3b1e17ca0815e92da58158e Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 21 Mar 2024 11:27:18 +0000 Subject: [PATCH] Revert detach-client part of last, did not intend this to go in. --- usr.bin/tmux/cmd-detach-client.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/usr.bin/tmux/cmd-detach-client.c b/usr.bin/tmux/cmd-detach-client.c index ed4d3f3cdef..25ceee3cb2d 100644 --- a/usr.bin/tmux/cmd-detach-client.c +++ b/usr.bin/tmux/cmd-detach-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-detach-client.c,v 1.37 2024/03/21 11:26:28 nicm Exp $ */ +/* $OpenBSD: cmd-detach-client.c,v 1.38 2024/03/21 11:27:18 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -59,7 +59,6 @@ cmd_detach_client_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); struct cmd_find_state *source = cmdq_get_source(item); - struct client *c = cmdq_get_client(item); struct client *tc = cmdq_get_target_client(item), *loop; struct session *s; enum msgtype msgtype; @@ -102,13 +101,9 @@ cmd_detach_client_exec(struct cmd *self, struct cmdq_item *item) return (CMD_RETURN_NORMAL); } - if (cmd != NULL) { - if (c == NULL || c->session == NULL) { - cmdq_error(item, "must be attached for -E"); - return (CMD_RETURN_ERROR); - } + if (cmd != NULL) server_client_exec(tc, cmd); - } else + else server_client_detach(tc, msgtype); return (CMD_RETURN_STOP); } -- 2.20.1