mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Silently ignore -a or -b if the window index doesn't exist and create
using that index (this is how it used to work), reported by Romain Francoise.
This commit is contained in:
		@@ -68,10 +68,8 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
 | 
				
			|||||||
	before = args_has(args, 'b');
 | 
						before = args_has(args, 'b');
 | 
				
			||||||
	if (args_has(args, 'a') || before) {
 | 
						if (args_has(args, 'a') || before) {
 | 
				
			||||||
		idx = winlink_shuffle_up(s, wl, before);
 | 
							idx = winlink_shuffle_up(s, wl, before);
 | 
				
			||||||
		if (idx == -1) {
 | 
							if (idx == -1)
 | 
				
			||||||
			cmdq_error(item, "couldn't get a window index");
 | 
								idx = target->idx;
 | 
				
			||||||
			return (CMD_RETURN_ERROR);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	memset(&sc, 0, sizeof sc);
 | 
						memset(&sc, 0, sizeof sc);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user