mirror of
https://github.com/tmux/tmux.git
synced 2025-01-05 23:38:48 +00:00
Rather than telling the client to exit in the function when creating a new
session detached, let the caller do it. Allows "tmux new -d \; attach" to work.
This commit is contained in:
parent
52793e7a3f
commit
e2ff51f93f
@ -239,8 +239,6 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
|
|||||||
if (ctx->cmdclient != NULL) {
|
if (ctx->cmdclient != NULL) {
|
||||||
if (!detached)
|
if (!detached)
|
||||||
server_write_client(ctx->cmdclient, MSG_READY, NULL, 0);
|
server_write_client(ctx->cmdclient, MSG_READY, NULL, 0);
|
||||||
else
|
|
||||||
server_write_client(ctx->cmdclient, MSG_EXIT, NULL, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the client to the new session. */
|
/* Set the client to the new session. */
|
||||||
@ -255,7 +253,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
|
|||||||
}
|
}
|
||||||
recalculate_sizes();
|
recalculate_sizes();
|
||||||
|
|
||||||
return (1); /* 1 means don't tell command client to exit */
|
return (!detached); /* 1 means don't tell command client to exit */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user