summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-switch-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-switch-client.c')
-rw-r--r--usr.bin/tmux/cmd-switch-client.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/usr.bin/tmux/cmd-switch-client.c b/usr.bin/tmux/cmd-switch-client.c
index 6502ee81643..7665b23ef1e 100644
--- a/usr.bin/tmux/cmd-switch-client.c
+++ b/usr.bin/tmux/cmd-switch-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-switch-client.c,v 1.68 2021/03/11 06:31:05 nicm Exp $ */
+/* $OpenBSD: cmd-switch-client.c,v 1.69 2021/08/13 06:52:51 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -134,23 +134,9 @@ cmd_switch_client_exec(struct cmd *self, struct cmdq_item *item)
if (!args_has(args, 'E'))
environ_update(s->options, tc->environ, s->environ);
- if (tc->session != NULL && tc->session != s)
- tc->last_session = tc->session;
- tc->session = s;
+ server_client_set_session(tc, s);
if (~cmdq_get_flags(item) & CMDQ_STATE_REPEAT)
server_client_set_key_table(tc, NULL);
- tty_update_client_offset(tc);
- status_timer_start(tc);
- notify_client("client-session-changed", tc);
- session_update_activity(s, NULL);
- gettimeofday(&s->last_attached_time, NULL);
-
- server_check_unattached();
- server_redraw_client(tc);
- s->curw->flags &= ~WINLINK_ALERTFLAGS;
- s->curw->window->latest = tc;
- recalculate_sizes();
- alerts_check_session(s);
return (CMD_RETURN_NORMAL);
}