mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master' into master
This commit is contained in:
		@@ -302,9 +302,12 @@ args_copy(struct args *args, int argc, char **argv)
 | 
			
		||||
	struct args_value	*value, *new_value;
 | 
			
		||||
	u_int			 i;
 | 
			
		||||
 | 
			
		||||
	cmd_log_argv(argc, argv, "%s", __func__);
 | 
			
		||||
 | 
			
		||||
	new_args = args_create();
 | 
			
		||||
	RB_FOREACH(entry, args_tree, &args->tree) {
 | 
			
		||||
		if (entry->count == 1) {
 | 
			
		||||
		if (TAILQ_EMPTY(&entry->values)) {
 | 
			
		||||
			for (i = 0; i < entry->count; i++)
 | 
			
		||||
				args_set(new_args, entry->flag, NULL);
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
@@ -314,6 +317,8 @@ args_copy(struct args *args, int argc, char **argv)
 | 
			
		||||
			args_set(new_args, entry->flag, new_value);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if (args->count == 0)
 | 
			
		||||
		return (new_args);
 | 
			
		||||
	new_args->count = args->count;
 | 
			
		||||
	new_args->values = xcalloc(args->count, sizeof *new_args->values);
 | 
			
		||||
	for (i = 0; i < args->count; i++) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user