diff options
-rw-r--r-- | cfg.c | 3 | ||||
-rw-r--r-- | server-client.c | 2 | ||||
-rw-r--r-- | tmux.h | 1 |
3 files changed, 5 insertions, 1 deletions
@@ -37,6 +37,7 @@ struct cfg_cond { }; TAILQ_HEAD(cfg_conds, cfg_cond); +struct client *cfg_client; static char *cfg_file; int cfg_finished; static char **cfg_causes; @@ -94,7 +95,7 @@ start_cfg(void) * command queue is currently empty and our callback will be at the * front - we need to get in before MSG_COMMAND. */ - c = TAILQ_FIRST(&clients); + cfg_client = c = TAILQ_FIRST(&clients); if (c != NULL) { cfg_item = cmdq_get_callback(cfg_client_done, NULL); cmdq_append(c, cfg_item); diff --git a/server-client.c b/server-client.c index dd1e8b81..e461e249 100644 --- a/server-client.c +++ b/server-client.c @@ -1996,6 +1996,8 @@ server_client_get_cwd(struct client *c, struct session *s) { const char *home; + if (!cfg_finished && cfg_client != NULL) + return (cfg_client->cwd); if (c != NULL && c->session == NULL && c->cwd != NULL) return (c->cwd); if (s != NULL && s->cwd != NULL) @@ -1529,6 +1529,7 @@ void proc_toggle_log(struct tmuxproc *); /* cfg.c */ extern int cfg_finished; +extern struct client *cfg_client; void start_cfg(void); int load_cfg(const char *, struct client *, struct cmdq_item *, int); void set_cfg_file(const char *); |