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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd-new-window.c b/cmd-new-window.c
index 2af6abf3..b3ec4379 100644
--- a/cmd-new-window.c
+++ b/cmd-new-window.c
@@ -154,6 +154,8 @@ cmd_new_window_exec(struct cmd *self, struct cmd_ctx *ctx)
else
cwd = ctx->cmdclient->cwd;
+ if (idx == -1)
+ idx = -1 - options_get_number(&s->options, "base-index");
wl = session_new(s, data->name, cmd, cwd, idx, &cause);
if (wl == NULL) {
ctx->error(ctx, "create window failed: %s", cause);