mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Do not check the client readonly flag when there is no client, GitHub issue 1980.
This commit is contained in:
		@@ -508,12 +508,16 @@ key_bindings_dispatch(struct key_binding *bd, struct cmdq_item *item,
 | 
			
		||||
	struct cmdq_item	*new_item;
 | 
			
		||||
	int			 readonly;
 | 
			
		||||
 | 
			
		||||
	if (c == NULL || (~c->flags & CLIENT_READONLY))
 | 
			
		||||
		readonly = 1;
 | 
			
		||||
	else {
 | 
			
		||||
		readonly = 1;
 | 
			
		||||
		TAILQ_FOREACH(cmd, &bd->cmdlist->list, qentry) {
 | 
			
		||||
		if (!(cmd->entry->flags & CMD_READONLY))
 | 
			
		||||
			if (~cmd->entry->flags & CMD_READONLY)
 | 
			
		||||
				readonly = 0;
 | 
			
		||||
		}
 | 
			
		||||
	if (!readonly && (c->flags & CLIENT_READONLY))
 | 
			
		||||
	}
 | 
			
		||||
	if (!readonly)
 | 
			
		||||
		new_item = cmdq_get_callback(key_bindings_read_only, NULL);
 | 
			
		||||
	else {
 | 
			
		||||
		new_item = cmdq_get_command(bd->cmdlist, fs, m, 0);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user