diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-08-13 20:11:58 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-08-13 20:11:58 +0000 |
commit | 3ad4de6c8cbdc767c6ac40b99764cc7bd8db066a (patch) | |
tree | 542f3ff53b0bc779bf29cb1ca1483e3636a86255 /cmd-break-pane.c | |
parent | 3026118c702fc0f17b860197b5242816927bbadb (diff) | |
download | rtmux-3ad4de6c8cbdc767c6ac40b99764cc7bd8db066a.tar.gz rtmux-3ad4de6c8cbdc767c6ac40b99764cc7bd8db066a.tar.bz2 rtmux-3ad4de6c8cbdc767c6ac40b99764cc7bd8db066a.zip |
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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd-break-pane.c b/cmd-break-pane.c index 57622119..b8d489de 100644 --- a/cmd-break-pane.c +++ b/cmd-break-pane.c @@ -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); |