summaryrefslogtreecommitdiffstats
path: root/cmd-split-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-split-window.c')
-rw-r--r--cmd-split-window.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd-split-window.c b/cmd-split-window.c
index ab7f9bc5..7b58f81f 100644
--- a/cmd-split-window.c
+++ b/cmd-split-window.c
@@ -88,10 +88,8 @@ cmd_split_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));
type = LAYOUT_TOPBOTTOM;
if (args_has(args, 'h'))