=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-switch-client.c,v retrieving revision 1.57 retrieving revision 1.58 diff -c -r1.57 -r1.58 *** src/usr.bin/tmux/cmd-switch-client.c 2019/04/17 14:39:37 1.57 --- src/usr.bin/tmux/cmd-switch-client.c 2019/08/14 09:58:31 1.58 *************** *** 1,4 **** ! /* $OpenBSD: cmd-switch-client.c,v 1.57 2019/04/17 14:39:37 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-switch-client.c,v 1.58 2019/08/14 09:58:31 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 34,41 **** .name = "switch-client", .alias = "switchc", ! .args = { "lc:Enpt:rT:", 0, 0 }, ! .usage = "[-Elnpr] [-c target-client] [-t target-session] " "[-T key-table]", /* -t is special */ --- 34,41 ---- .name = "switch-client", .alias = "switchc", ! .args = { "lc:Enpt:rT:Z", 0, 0 }, ! .usage = "[-ElnprZ] [-c target-client] [-t target-session] " "[-T key-table]", /* -t is special */ *************** *** 54,59 **** --- 54,60 ---- struct client *c; struct session *s; struct winlink *wl; + struct window *w; struct window_pane *wp; const char *tablename; struct key_table *table; *************** *** 72,77 **** --- 73,79 ---- return (CMD_RETURN_ERROR); s = item->target.s; wl = item->target.wl; + w = wl->window; wp = item->target.wp; if (args_has(args, 'r')) *************** *** 112,123 **** } else { if (item->client == NULL) return (CMD_RETURN_NORMAL); if (wl != NULL) { - server_unzoom_window(wl->window); - if (wp != NULL) { - window_redraw_active_switch(wp->window, wp); - window_set_active_pane(wp->window, wp, 1); - } session_set_current(s, wl); cmd_find_from_session(&item->shared->current, s, 0); } --- 114,128 ---- } else { if (item->client == NULL) return (CMD_RETURN_NORMAL); + if (wl != NULL && wp != NULL) { + if (window_push_zoom(w, args_has(self->args, 'Z'))) + server_redraw_window(w); + window_redraw_active_switch(w, wp); + window_set_active_pane(w, wp, 1); + if (window_pop_zoom(w)) + server_redraw_window(w); + } if (wl != NULL) { session_set_current(s, wl); cmd_find_from_session(&item->shared->current, s, 0); }