mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Handle pan correctly when the terminal is bigger than the window.
This commit is contained in:
		
							
								
								
									
										8
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								tty.c
									
									
									
									
									
								
							@@ -746,10 +746,14 @@ tty_window_offset1(struct tty *tty, u_int *ox, u_int *oy, u_int *sx, u_int *sy)
 | 
			
		||||
	*sy = tty->sy - lines;
 | 
			
		||||
 | 
			
		||||
	if (c->pan_window == w) {
 | 
			
		||||
		if (c->pan_ox + *sx > w->sx)
 | 
			
		||||
		if (*sx >= w->sx)
 | 
			
		||||
			c->pan_ox = 0;
 | 
			
		||||
		else if (c->pan_ox + *sx > w->sx)
 | 
			
		||||
			c->pan_ox = w->sx - *sx;
 | 
			
		||||
		*ox = c->pan_ox;
 | 
			
		||||
		if (c->pan_oy + *sy > w->sy)
 | 
			
		||||
		if (*sy >= w->sy)
 | 
			
		||||
			c->pan_oy = 0;
 | 
			
		||||
		else if (c->pan_oy + *sy > w->sy)
 | 
			
		||||
			c->pan_oy = w->sy - *sy;
 | 
			
		||||
		*oy = c->pan_oy;
 | 
			
		||||
		return (1);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user