=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-attach-session.c,v retrieving revision 1.65 retrieving revision 1.66 diff -c -r1.65 -r1.66 *** src/usr.bin/tmux/cmd-attach-session.c 2016/10/16 22:06:40 1.65 --- src/usr.bin/tmux/cmd-attach-session.c 2017/01/24 20:15:32 1.66 *************** *** 1,4 **** ! /* $OpenBSD: cmd-attach-session.c,v 1.65 2016/10/16 22:06:40 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-attach-session.c,v 1.66 2017/01/24 20:15:32 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 54,60 **** struct client *c = item->client, *c_loop; struct winlink *wl = item->state.tflag.wl; struct window_pane *wp = item->state.tflag.wp; - const char *update; char *cause, *cwd; struct format_tree *ft; --- 54,59 ---- *************** *** 95,107 **** server_client_detach(c_loop, MSG_DETACH); } } - if (!Eflag) { - update = options_get_string(s->options, - "update-environment"); - environ_update(update, c->environ, s->environ); - } - c->session = s; server_client_set_key_table(c, NULL); status_timer_start(c); --- 94,102 ---- server_client_detach(c_loop, MSG_DETACH); } } + if (!Eflag) + environ_update(s->options, c->environ, s->environ); c->session = s; server_client_set_key_table(c, NULL); status_timer_start(c); *************** *** 116,122 **** free(cause); return (CMD_RETURN_ERROR); } - if (rflag) c->flags |= CLIENT_READONLY; --- 111,116 ---- *************** *** 127,138 **** server_client_detach(c_loop, MSG_DETACH); } } ! ! if (!Eflag) { ! update = options_get_string(s->options, ! "update-environment"); ! environ_update(update, c->environ, s->environ); ! } c->session = s; server_client_set_key_table(c, NULL); --- 121,128 ---- server_client_detach(c_loop, MSG_DETACH); } } ! if (!Eflag) ! environ_update(s->options, c->environ, s->environ); c->session = s; server_client_set_key_table(c, NULL);