diff options
Diffstat (limited to 'cmd-new-window.c')
-rw-r--r-- | cmd-new-window.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd-new-window.c b/cmd-new-window.c index 6517e99e..6a7cf0b8 100644 --- a/cmd-new-window.c +++ b/cmd-new-window.c @@ -95,10 +95,8 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item) if ((tmp = args_get(args, 'c')) != NULL) cwd = format_single(item, tmp, c, s, NULL, NULL); - else if (item->client != NULL && item->client->session == NULL) - cwd = xstrdup(item->client->cwd); else - cwd = xstrdup(s->cwd); + cwd = xstrdup(server_client_get_cwd(item->client, s)); if ((tmp = args_get(args, 'n')) != NULL) name = format_single(item, tmp, c, s, NULL, NULL); |