=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-attach-session.c,v retrieving revision 1.80 retrieving revision 1.81 diff -c -r1.80 -r1.81 *** src/usr.bin/tmux/cmd-attach-session.c 2020/04/13 08:26:27 1.80 --- src/usr.bin/tmux/cmd-attach-session.c 2020/04/13 10:59:58 1.81 *************** *** 1,4 **** ! /* $OpenBSD: cmd-attach-session.c,v 1.80 2020/04/13 08:26:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-attach-session.c,v 1.81 2020/04/13 10:59:58 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 50,59 **** cmd_attach_session(struct cmdq_item *item, const char *tflag, int dflag, int xflag, int rflag, const char *cflag, int Eflag) { ! struct cmd_find_state *current = &item->shared->current; enum cmd_find_type type; int flags; ! struct client *c = item->client, *c_loop; struct session *s; struct winlink *wl; struct window_pane *wp; --- 50,61 ---- cmd_attach_session(struct cmdq_item *item, const char *tflag, int dflag, int xflag, int rflag, const char *cflag, int Eflag) { ! struct cmdq_shared *shared = cmdq_get_shared(item); ! struct cmd_find_state *current = &shared->current; ! struct cmd_find_state target; enum cmd_find_type type; int flags; ! struct client *c = cmdq_get_client(item), *c_loop; struct session *s; struct winlink *wl; struct window_pane *wp; *************** *** 80,90 **** type = CMD_FIND_SESSION; flags = CMD_FIND_PREFER_UNATTACHED; } ! if (cmd_find_target(&item->target, item, tflag, type, flags) != 0) return (CMD_RETURN_ERROR); ! s = item->target.s; ! wl = item->target.wl; ! wp = item->target.wp; if (wl != NULL) { if (wp != NULL) --- 82,92 ---- type = CMD_FIND_SESSION; flags = CMD_FIND_PREFER_UNATTACHED; } ! if (cmd_find_target(&target, item, tflag, type, flags) != 0) return (CMD_RETURN_ERROR); ! s = target.s; ! wl = target.wl; ! wp = target.wp; if (wl != NULL) { if (wp != NULL) *************** *** 118,124 **** environ_update(s->options, c->environ, s->environ); c->session = s; ! if (~item->shared->flags & CMDQ_SHARED_REPEAT) server_client_set_key_table(c, NULL); tty_update_client_offset(c); status_timer_start(c); --- 120,126 ---- environ_update(s->options, c->environ, s->environ); c->session = s; ! if (~shared->flags & CMDQ_SHARED_REPEAT) server_client_set_key_table(c, NULL); tty_update_client_offset(c); status_timer_start(c);