aboutsummaryrefslogtreecommitdiff
path: root/cmd-switch-client.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-05-09 12:51:41 +0100
committerThomas Adam <thomas@xteddy.org>2015-05-09 12:52:38 +0100
commit504b97b6a4314a7a052d9b05de746515e2a03628 (patch)
tree6b6316b7f7d35725bd0ce2377adae1847cc324da /cmd-switch-client.c
parent6525ca51584636ef781bda147d37d5d0d10899e0 (diff)
parent92faa2eaebd32117f01b0b7d7ae81abdfde2d935 (diff)
downloadrtmux-504b97b6a4314a7a052d9b05de746515e2a03628.tar.gz
rtmux-504b97b6a4314a7a052d9b05de746515e2a03628.tar.bz2
rtmux-504b97b6a4314a7a052d9b05de746515e2a03628.zip
Merge branch 'obsd-master'
Conflicts: tmux.h
Diffstat (limited to 'cmd-switch-client.c')
-rw-r--r--cmd-switch-client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd-switch-client.c b/cmd-switch-client.c
index 18de0eb1..369fc917 100644
--- a/cmd-switch-client.c
+++ b/cmd-switch-client.c
@@ -46,7 +46,7 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
struct winlink *wl = NULL;
struct window *w = NULL;
struct window_pane *wp = NULL;
- const char *tflag, *tablename;
+ const char *tflag, *tablename, *update;
struct key_table *table;
if ((c = cmd_find_client(cmdq, args_get(args, 'c'), 0)) == NULL)
@@ -119,6 +119,11 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
}
}
+ if (c != NULL && s != c->session) {
+ update = options_get_string(&s->options, "update-environment");
+ environ_update(update, &c->environ, &s->environ);
+ }
+
if (c->session != NULL)
c->last_session = c->session;
c->session = s;