diff options
author | nicm <nicm> | 2018-05-24 09:42:49 +0000 |
---|---|---|
committer | nicm <nicm> | 2018-05-24 09:42:49 +0000 |
commit | b9a6162d2f9bea63c3ad421e9c3969eea2852b00 (patch) | |
tree | d944f370a3a21ea175f9fe958f9773146cdbfc1a /cmd-split-window.c | |
parent | 8f5903d7c3d75763ed5dc37ff49a39fe3b3b7831 (diff) |
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.
Diffstat (limited to 'cmd-split-window.c')
-rw-r--r-- | cmd-split-window.c | 4 |
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')) |