mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		
							
								
								
									
										7
									
								
								screen.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								screen.c
									
									
									
									
									
								
							@@ -229,7 +229,9 @@ screen_resize_cursor(struct screen *s, u_int sx, u_int sy, int reflow,
 | 
				
			|||||||
		cy = т
 | 
							cy = т
 | 
				
			||||||
	*cy = s->grid->hsize + s->cy;
 | 
						*cy = s->grid->hsize + s->cy;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log_debug("%s: start %u,%u (%u,%u)", __func__, s->cx, s->cy, *cx, *cy);
 | 
						log_debug("%s: new size %ux%u, now %ux%u (cursor %u,%u = %u,%u)",
 | 
				
			||||||
 | 
						    __func__, sx, sy, screen_size_x(s), screen_size_y(s), s->cx, s->cy,
 | 
				
			||||||
 | 
						    *cx, *cy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (sx < 1)
 | 
						if (sx < 1)
 | 
				
			||||||
		sx = 1;
 | 
							sx = 1;
 | 
				
			||||||
@@ -255,7 +257,8 @@ screen_resize_cursor(struct screen *s, u_int sx, u_int sy, int reflow,
 | 
				
			|||||||
		s->cx = 0;
 | 
							s->cx = 0;
 | 
				
			||||||
		s->cy = 0;
 | 
							s->cy = 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	log_debug("%s: finish %u,%u (%u,%u)", __func__, s->cx, s->cy, *cx, *cy);
 | 
						log_debug("%s: cursor finished at %u,%u = %u,%u", __func__, s->cx,
 | 
				
			||||||
 | 
						    s->cy, *cx, *cy);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Resize screen. */
 | 
					/* Resize screen. */
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								tmux.h
									
									
									
									
									
								
							@@ -81,7 +81,7 @@ struct winlink;
 | 
				
			|||||||
#define NAME_INTERVAL 500000
 | 
					#define NAME_INTERVAL 500000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Maximum size of data to hold from a pane. */
 | 
					/* Maximum size of data to hold from a pane. */
 | 
				
			||||||
#define READ_SIZE 4096
 | 
					#define READ_SIZE 8192
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Default pixel cell sizes. */
 | 
					/* Default pixel cell sizes. */
 | 
				
			||||||
#define DEFAULT_XPIXEL 16
 | 
					#define DEFAULT_XPIXEL 16
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -314,14 +314,22 @@ window_copy_clone_screen(struct screen *src, struct screen *hint, u_int *cx,
 | 
				
			|||||||
			break;
 | 
								break;
 | 
				
			||||||
		sy--;
 | 
							sy--;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						log_debug("%s: target screen is %ux%u, source %ux%u", __func__,
 | 
				
			||||||
 | 
						    screen_size_x(src), sy, screen_size_x(hint),
 | 
				
			||||||
 | 
						    screen_hsize(src) + screen_size_y(src));
 | 
				
			||||||
	screen_init(dst, screen_size_x(src), sy, screen_hlimit(src));
 | 
						screen_init(dst, screen_size_x(src), sy, screen_hlimit(src));
 | 
				
			||||||
	grid_duplicate_lines(dst->grid, 0, src->grid, 0, sy);
 | 
						grid_duplicate_lines(dst->grid, 0, src->grid, 0, sy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dst->grid->sy = sy - screen_hsize(src);
 | 
						dst->grid->sy = sy - screen_hsize(src);
 | 
				
			||||||
	dst->grid->hsize = screen_hsize(src);
 | 
						dst->grid->hsize = screen_hsize(src);
 | 
				
			||||||
	dst->grid->hscrolled = src->grid->hscrolled;
 | 
						dst->grid->hscrolled = src->grid->hscrolled;
 | 
				
			||||||
	dst->cx = src->cx;
 | 
						if (src->cy > dst->grid->sy - 1) {
 | 
				
			||||||
	dst->cy = src->cy;
 | 
							dst->cx = 0;
 | 
				
			||||||
 | 
							dst->cy = dst->grid->sy - 1;
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							dst->cx = src->cx;
 | 
				
			||||||
 | 
							dst->cy = src->cy;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	screen_resize_cursor(dst, screen_size_x(hint), screen_size_y(hint), 1,
 | 
						screen_resize_cursor(dst, screen_size_x(hint), screen_size_y(hint), 1,
 | 
				
			||||||
	    0, cx, cy);
 | 
						    0, cx, cy);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user