diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-08-16 19:16:27 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-08-16 19:16:27 +0000 |
commit | e61ee94e26a82479b5de2ed4c1686625ea5d078d (patch) | |
tree | b30a1f1c63e3cf956c73ec161d90999e7953b187 /cmd-break-pane.c | |
parent | 9116905b24ff6ee585f42295b302812aad853ff1 (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-break-pane.c')
-rw-r--r-- | cmd-break-pane.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd-break-pane.c b/cmd-break-pane.c index e88378ca..63e4c6a9 100644 --- a/cmd-break-pane.c +++ b/cmd-break-pane.c @@ -1,4 +1,4 @@ -/* $Id: cmd-break-pane.c,v 1.7 2009-07-30 20:45:20 tcunha Exp $ */ +/* $Id: cmd-break-pane.c,v 1.8 2009-08-16 19:16:27 tcunha Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -48,6 +48,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_ctx *ctx) struct window_pane *wp; struct window *w; char *cause; + int base_idx; if ((wl = cmd_find_pane(ctx, data->target, &s, &wp)) == NULL) return (-1); @@ -71,7 +72,8 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_ctx *ctx) w->name = default_window_name(w); layout_init(w); - wl = session_attach(s, w, -1, &cause); /* can't fail */ + base_idx = options_get_number(&s->options, "base-index"); + wl = session_attach(s, w, -1 - base_idx, &cause); /* can't fail */ if (!(data->chflags & CMD_CHFLAG('d'))) session_select(s, wl->idx); |