mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Pass in the session, rather than the client, to window modes' key()
function. We were only ever using the client to find the session anyway. This allows send-key to work properly for manipulating copy mode from outside tmux. From Micah Cowan.
This commit is contained in:
		@@ -105,16 +105,17 @@ cmd_send_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
 | 
			
		||||
{
 | 
			
		||||
	struct cmd_send_keys_data	*data = self->data;
 | 
			
		||||
	struct window_pane		*wp;
 | 
			
		||||
	struct session			*s;
 | 
			
		||||
	u_int				 i;
 | 
			
		||||
 | 
			
		||||
	if (data == NULL)
 | 
			
		||||
		return (-1);
 | 
			
		||||
 | 
			
		||||
	if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
 | 
			
		||||
	if (cmd_find_pane(ctx, data->target, &s, &wp) == NULL)
 | 
			
		||||
		return (-1);
 | 
			
		||||
 | 
			
		||||
	for (i = 0; i < data->nkeys; i++)
 | 
			
		||||
		window_pane_key(wp, ctx->curclient, data->keys[i]);
 | 
			
		||||
		window_pane_key(wp, s, data->keys[i]);
 | 
			
		||||
 | 
			
		||||
	return (0);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user