From 3f86d6d46014ca55e42cecd570d7f269b1d386b3 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 13 Apr 2020 15:55:51 +0000 Subject: When adding a list of commands to the queue, instead of automatically creating a new state for each group of commands, require the caller to create one and use it for all the commands in the list. This means the current target works even with list with multiple groups (which can happen if they are defined with newlines). --- cmd-new-session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd-new-session.c') diff --git a/cmd-new-session.c b/cmd-new-session.c index 5286d320..574cd5cd 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -344,10 +344,10 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item) free(cp); } - if (!detached) { + if (!detached) c->flags |= CLIENT_ATTACHED; + if (!args_has(args, 'd')) cmd_find_from_session(current, s, 0); - } cmd_find_from_session(&fs, s, 0); cmdq_insert_hook(s, item, &fs, "after-new-session"); -- cgit v1.2.3