aboutsummaryrefslogtreecommitdiff
path: root/cmd-new-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-new-window.c')
-rw-r--r--cmd-new-window.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/cmd-new-window.c b/cmd-new-window.c
index 065e2b1f..30ddd643 100644
--- a/cmd-new-window.c
+++ b/cmd-new-window.c
@@ -98,13 +98,7 @@ cmd_new_window_exec(struct cmd *self, struct cmd_ctx *ctx)
cmd = options_get_string(&s->options, "default-command");
else
cmd = args->argv[0];
- cwd = options_get_string(&s->options, "default-path");
- if (*cwd == '\0') {
- if (ctx->cmdclient != NULL && ctx->cmdclient->cwd != NULL)
- cwd = ctx->cmdclient->cwd;
- else
- cwd = s->cwd;
- }
+ cwd = cmd_get_default_path(ctx);
if (idx == -1)
idx = -1 - options_get_number(&s->options, "base-index");