mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Rv EOL optimisation, it screws up selection.
This commit is contained in:
		
							
								
								
									
										15
									
								
								screen.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								screen.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: screen.c,v 1.47 2007-11-25 13:03:01 nicm Exp $ */
 | 
					/* $Id: screen.c,v 1.48 2007-11-26 20:45:13 nicm Exp $ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
					 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
				
			||||||
@@ -455,18 +455,7 @@ screen_draw_column(struct screen_draw_ctx *ctx, u_int px)
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
screen_draw_line(struct screen_draw_ctx *ctx, u_int py)
 | 
					screen_draw_line(struct screen_draw_ctx *ctx, u_int py)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	u_int	cx, cy;
 | 
						screen_draw_cells(ctx, 0, py, screen_size_x(ctx->s));
 | 
				
			||||||
 | 
					 | 
				
			||||||
	cy = screen_y(ctx->s, py) - ctx->oy;
 | 
					 | 
				
			||||||
	cx = ctx->s->grid_size[cy];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (screen_size_x(ctx->s) < 3 || cx >= screen_size_x(ctx->s) - 3)
 | 
					 | 
				
			||||||
		screen_draw_cells(ctx, 0, py, screen_size_x(ctx->s));
 | 
					 | 
				
			||||||
	else {
 | 
					 | 
				
			||||||
		screen_draw_cells(ctx, 0, py, cx);
 | 
					 | 
				
			||||||
		screen_draw_move(ctx, cx, py);
 | 
					 | 
				
			||||||
		input_store_zero(ctx->b, CODE_CLEARENDOFLINE);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Draw set of lines. */
 | 
					/* Draw set of lines. */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: window-copy.c,v 1.7 2007-11-26 20:36:30 nicm Exp $ */
 | 
					/* $Id: window-copy.c,v 1.8 2007-11-26 20:45:13 nicm Exp $ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
					 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
				
			||||||
@@ -356,6 +356,9 @@ window_copy_cursor_bol(struct window *w)
 | 
				
			|||||||
	if (data->ox != 0)
 | 
						if (data->ox != 0)
 | 
				
			||||||
		window_copy_scroll_right(w, data->ox);
 | 
							window_copy_scroll_right(w, data->ox);
 | 
				
			||||||
	data->cx = 0;
 | 
						data->cx = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (data->selflag)
 | 
				
			||||||
 | 
							window_copy_draw_lines(w, data->cy, 1);
 | 
				
			||||||
	window_copy_move_cursor(w);
 | 
						window_copy_move_cursor(w);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -394,6 +397,8 @@ window_copy_cursor_eol(struct window *w)
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (data->selflag)
 | 
				
			||||||
 | 
							window_copy_draw_lines(w, data->cy, 1);
 | 
				
			||||||
	window_copy_move_cursor(w);
 | 
						window_copy_move_cursor(w);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user