mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Format for scroll position, from Jorge Morante.
This commit is contained in:
		
							
								
								
									
										6
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								format.c
									
									
									
									
									
								
							@@ -1005,7 +1005,7 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp)
 | 
			
		||||
{
 | 
			
		||||
	struct grid	*gd = wp->base.grid;
 | 
			
		||||
	u_int		 idx;
 | 
			
		||||
	int  		 status;
 | 
			
		||||
	int  		 status, scroll_position;
 | 
			
		||||
 | 
			
		||||
	if (ft->w == NULL)
 | 
			
		||||
		ft->w = wp->window;
 | 
			
		||||
@@ -1052,6 +1052,10 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp)
 | 
			
		||||
	format_add(ft, "scroll_region_upper", "%u", wp->base.rupper);
 | 
			
		||||
	format_add(ft, "scroll_region_lower", "%u", wp->base.rlower);
 | 
			
		||||
 | 
			
		||||
	scroll_position = window_copy_scroll_position(wp);
 | 
			
		||||
	if (scroll_position != -1)
 | 
			
		||||
		format_add(ft, "scroll_position", "%d", scroll_position);
 | 
			
		||||
 | 
			
		||||
	format_add(ft, "alternate_on", "%d", wp->saved_grid ? 1 : 0);
 | 
			
		||||
	format_add(ft, "alternate_saved_x", "%u", wp->saved_cx);
 | 
			
		||||
	format_add(ft, "alternate_saved_y", "%u", wp->saved_cy);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user