mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Mark -n keys with (no prefix) rather than [].
This commit is contained in:
		@@ -71,13 +71,15 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
 | 
			
		||||
		key = key_string_lookup_key(bd->key & ~KEYC_PREFIX);
 | 
			
		||||
		if (key == NULL)
 | 
			
		||||
			continue;
 | 
			
		||||
		if (!(bd->key & KEYC_PREFIX))
 | 
			
		||||
			used = xsnprintf(tmp, sizeof tmp, "[%s]: ", key);
 | 
			
		||||
		else
 | 
			
		||||
			used = xsnprintf(tmp, sizeof tmp, "%*s: ", width, key);
 | 
			
		||||
		used = xsnprintf(tmp, sizeof tmp, "%*s: ", width, key);
 | 
			
		||||
		if (used >= sizeof tmp)
 | 
			
		||||
			continue;
 | 
			
		||||
 | 
			
		||||
 		if (!(bd->key & KEYC_PREFIX)) {
 | 
			
		||||
			used = strlcat(tmp, "(no prefix) ", sizeof tmp);
 | 
			
		||||
			if (used >= sizeof tmp)
 | 
			
		||||
				continue;
 | 
			
		||||
		}
 | 
			
		||||
		cmd_list_print(bd->cmdlist, tmp + used, (sizeof tmp) - used);
 | 
			
		||||
		ctx->print(ctx, "%s", tmp);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user