diff options
Diffstat (limited to 'usr.bin/tmux/cmd-new-session.c')
-rw-r--r-- | usr.bin/tmux/cmd-new-session.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-new-session.c b/usr.bin/tmux/cmd-new-session.c index cce9c8d0dec..b578ad74f7d 100644 --- a/usr.bin/tmux/cmd-new-session.c +++ b/usr.bin/tmux/cmd-new-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-new-session.c,v 1.30 2010/06/27 02:56:59 nicm Exp $ */ +/* $OpenBSD: cmd-new-session.c,v 1.31 2010/12/11 18:39:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -279,9 +279,17 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx) if (!detached) { if (ctx->cmdclient != NULL) { server_write_client(ctx->cmdclient, MSG_READY, NULL, 0); + if (ctx->cmdclient->session != NULL) { + session_index(ctx->cmdclient->session, + &ctx->cmdclient->last_session); + } ctx->cmdclient->session = s; server_redraw_client(ctx->cmdclient); } else { + if (ctx->curclient->session != NULL) { + session_index(ctx->curclient->session, + &ctx->curclient->last_session); + } ctx->curclient->session = s; server_redraw_client(ctx->curclient); } |