diff options
author | 2018-05-24 09:42:49 +0000 | |
---|---|---|
committer | 2018-05-24 09:42:49 +0000 | |
commit | 8a00c84cfc00a28fa8b08e6f9e7c012de7ccc786 (patch) | |
tree | 12e36be4a7f7bf31f3e2d3675296183cf5d7e3c9 /usr.bin/tmux/cmd-split-window.c | |
parent | Improve logging of the environment etc for new panes. (diff) | |
download | wireguard-openbsd-8a00c84cfc00a28fa8b08e6f9e7c012de7ccc786.tar.xz wireguard-openbsd-8a00c84cfc00a28fa8b08e6f9e7c012de7ccc786.zip |
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 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-split-window.c | 6 |
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')) |