mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Add selection_present format so commands in copy mode can use it, GitHub
issue 1028.
This commit is contained in:
		@@ -2407,14 +2407,17 @@ window_copy_scroll_down(struct window_pane *wp, u_int ny)
 | 
			
		||||
	screen_write_stop(&ctx);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
window_copy_scroll_position(struct window_pane *wp)
 | 
			
		||||
void
 | 
			
		||||
window_copy_add_formats(struct window_pane *wp, struct format_tree *ft)
 | 
			
		||||
{
 | 
			
		||||
	struct window_copy_mode_data	*data = wp->modedata;
 | 
			
		||||
	struct screen			*s = &data->screen;
 | 
			
		||||
 | 
			
		||||
	if (wp->mode != &window_copy_mode)
 | 
			
		||||
		return (-1);
 | 
			
		||||
	return (data->oy);
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	format_add(ft, "selection_present", "%d", s->sel.flag);
 | 
			
		||||
	format_add(ft, "scroll_position", "%d", data->oy);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user