mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		@@ -436,15 +436,15 @@ cmd_find_get_window_with_session(struct cmd_find_state *fs, const char *window)
 | 
			
		||||
	if (window[0] != '+' && window[0] != '-') {
 | 
			
		||||
		idx = strtonum(window, 0, INT_MAX, &errstr);
 | 
			
		||||
		if (errstr == NULL) {
 | 
			
		||||
			if (fs->flags & CMD_FIND_WINDOW_INDEX) {
 | 
			
		||||
				fs->idx = idx;
 | 
			
		||||
				return (0);
 | 
			
		||||
			}
 | 
			
		||||
			fs->wl = winlink_find_by_index(&fs->s->windows, idx);
 | 
			
		||||
			if (fs->wl != NULL) {
 | 
			
		||||
				fs->w = fs->wl->window;
 | 
			
		||||
				return (0);
 | 
			
		||||
			}
 | 
			
		||||
			if (fs->flags & CMD_FIND_WINDOW_INDEX) {
 | 
			
		||||
				fs->idx = idx;
 | 
			
		||||
				return (0);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -1181,6 +1181,7 @@ cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item,
 | 
			
		||||
		/* This will fill in session, winlink and window. */
 | 
			
		||||
		if (cmd_find_get_window(fs, window, window_only) != 0)
 | 
			
		||||
			goto no_window;
 | 
			
		||||
		if (fs->wl != NULL) /* can be NULL if index only */
 | 
			
		||||
			fs->wp = fs->wl->window->active;
 | 
			
		||||
		goto found;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -63,7 +63,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
	struct environ_entry	*envent;
 | 
			
		||||
	struct cmd_find_state	 fs;
 | 
			
		||||
 | 
			
		||||
	if (args_has(args, 'a')) {
 | 
			
		||||
	if (args_has(args, 'a') && wl != NULL) {
 | 
			
		||||
		if ((idx = winlink_shuffle_up(s, wl)) == -1) {
 | 
			
		||||
			cmdq_error(item, "no free window indexes");
 | 
			
		||||
			return (CMD_RETURN_ERROR);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user