mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00: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