summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-split-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r--usr.bin/tmux/cmd-split-window.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c
index 6aa6cea2f0c..0e96d041d6a 100644
--- a/usr.bin/tmux/cmd-split-window.c
+++ b/usr.bin/tmux/cmd-split-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-split-window.c,v 1.89 2018/03/16 15:15:39 nicm Exp $ */
+/* $OpenBSD: cmd-split-window.c,v 1.90 2018/05/24 09:42:49 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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'))