mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	unbind-key -a is allowed no arguments.
This commit is contained in:
		@@ -31,7 +31,7 @@ int	cmd_unbind_key_table(struct cmd *, struct cmd_ctx *, int);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const struct cmd_entry cmd_unbind_key_entry = {
 | 
					const struct cmd_entry cmd_unbind_key_entry = {
 | 
				
			||||||
	"unbind-key", "unbind",
 | 
						"unbind-key", "unbind",
 | 
				
			||||||
	"acnt:", 1, 1,
 | 
						"acnt:", 0, 1,
 | 
				
			||||||
	"[-acn] [-t key-table] key",
 | 
						"[-acn] [-t key-table] key",
 | 
				
			||||||
	0,
 | 
						0,
 | 
				
			||||||
	NULL,
 | 
						NULL,
 | 
				
			||||||
@@ -43,6 +43,8 @@ int
 | 
				
			|||||||
cmd_unbind_key_check(struct args *args)
 | 
					cmd_unbind_key_check(struct args *args)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (args_has(args, 'a') && (args->argc != 0 || args_has(args, 't')))
 | 
						if (args_has(args, 'a') && (args->argc != 0 || args_has(args, 't')))
 | 
				
			||||||
 | 
						    return (-1);
 | 
				
			||||||
 | 
						if (!args_has(args, 'a') && args->argc != 1)
 | 
				
			||||||
		return (-1);
 | 
							return (-1);
 | 
				
			||||||
	return (0);
 | 
						return (0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user