mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 01:34:18 +00:00 
			
		
		
		
	Key bindings steal a reference to the command instead of adding their
own, it was correct not to add a reference when parsing, but the bind-key then needs to add one.
This commit is contained in:
		@@ -75,6 +75,7 @@ cmd_bind_key_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
	value = args_value(args, 1);
 | 
			
		||||
	if (count == 2 && value->type == ARGS_COMMANDS) {
 | 
			
		||||
		key_bindings_add(tablename, key, note, repeat, value->cmdlist);
 | 
			
		||||
		value->cmdlist->references++;
 | 
			
		||||
		return (CMD_RETURN_NORMAL);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -817,7 +817,6 @@ cmd_parse_build_command(struct cmd_parse_command *cmd,
 | 
			
		||||
				goto out;
 | 
			
		||||
			values[count].type = ARGS_COMMANDS;
 | 
			
		||||
			values[count].cmdlist = pr->cmdlist;
 | 
			
		||||
			values[count].cmdlist->references++;
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
		count++;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user