mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Completely rewrite the reflow code to correctly handle double width
characters (previously they were not accounted for).
This commit is contained in:
		@@ -378,7 +378,8 @@ screen_write_copy(struct screen_write_ctx *ctx, struct screen *src, u_int px,
 | 
			
		||||
					gc.bg = mgc->bg;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			screen_write_cell(ctx, &gc);
 | 
			
		||||
			if (xx + gc.data.width <= px + nx)
 | 
			
		||||
				screen_write_cell(ctx, &gc);
 | 
			
		||||
		}
 | 
			
		||||
		cy++;
 | 
			
		||||
		screen_write_cursormove(ctx, cx, cy);
 | 
			
		||||
@@ -410,6 +411,8 @@ screen_write_fast_copy(struct screen_write_ctx *ctx, struct screen *src,
 | 
			
		||||
			if (xx >= gd->linedata[yy].cellsize)
 | 
			
		||||
				break;
 | 
			
		||||
			grid_get_cell(gd, xx, yy, &gc);
 | 
			
		||||
			if (xx + gc.data.width > px + nx)
 | 
			
		||||
				break;
 | 
			
		||||
			if (!grid_cells_equal(&gc, &grid_default_cell))
 | 
			
		||||
				grid_view_set_cell(ctx->s->grid, cx, cy, &gc);
 | 
			
		||||
			cx++;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user