From b9a6162d2f9bea63c3ad421e9c3969eea2852b00 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 24 May 2018 09:42:49 +0000 Subject: Make server_client_get_cwd used (almost) everywhere we need to work out the cwd, and do not fall back to "." as it is pretty useless. GitHub issue 1331. --- cmd-split-window.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cmd-split-window.c') 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')) -- cgit v1.2.3