mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-16 00:28:10 +02:00
Add a base-index session option to specify the first index checked when looking
for an index for a new window.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user