summaryrefslogtreecommitdiffstats
path: root/cmd-new-window.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-16 19:16:27 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-16 19:16:27 +0000
commite61ee94e26a82479b5de2ed4c1686625ea5d078d (patch)
treeb30a1f1c63e3cf956c73ec161d90999e7953b187 /cmd-new-window.c
parent9116905b24ff6ee585f42295b302812aad853ff1 (diff)
Sync OpenBSD patchset 257:
Add a base-index session option to specify the first index checked when looking for an index for a new window.
Diffstat (limited to 'cmd-new-window.c')
-rw-r--r--cmd-new-window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd-new-window.c b/cmd-new-window.c
index 243ce990..7f304a59 100644
--- a/cmd-new-window.c
+++ b/cmd-new-window.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-new-window.c,v 1.36 2009-07-28 22:12:16 tcunha Exp $ */
+/* $Id: cmd-new-window.c,v 1.37 2009-08-16 19:16:27 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);