mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Correctly remove overwritten wide characters at column 1.
This commit is contained in:
		
							
								
								
									
										1
									
								
								grid.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								grid.c
									
									
									
									
									
								
							@@ -267,6 +267,7 @@ grid_set_tab(struct grid_cell *gc, u_int width)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	memset(gc->data.data, 0, sizeof gc->data.data);
 | 
						memset(gc->data.data, 0, sizeof gc->data.data);
 | 
				
			||||||
	gc->flags |= GRID_FLAG_TAB;
 | 
						gc->flags |= GRID_FLAG_TAB;
 | 
				
			||||||
 | 
						gc->flags &= ~GRID_FLAG_PADDING;
 | 
				
			||||||
	gc->data.width = gc->data.size = gc->data.have = width;
 | 
						gc->data.width = gc->data.size = gc->data.have = width;
 | 
				
			||||||
	memset(gc->data.data, ' ', gc->data.size);
 | 
						memset(gc->data.data, ' ', gc->data.size);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1782,9 +1782,13 @@ screen_write_collect_end(struct screen_write_ctx *ctx)
 | 
				
			|||||||
			grid_view_set_cell(s->grid, xx, s->cy,
 | 
								grid_view_set_cell(s->grid, xx, s->cy,
 | 
				
			||||||
			    &grid_default_cell);
 | 
								    &grid_default_cell);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (gc.data.width > 1) {
 | 
							if (xx != s->cx) {
 | 
				
			||||||
			grid_view_set_cell(s->grid, xx, s->cy,
 | 
								if (xx == 0)
 | 
				
			||||||
			    &grid_default_cell);
 | 
									grid_view_get_cell(s->grid, 0, s->cy, &gc);
 | 
				
			||||||
 | 
								if (gc.data.width > 1) {
 | 
				
			||||||
 | 
									grid_view_set_cell(s->grid, xx, s->cy,
 | 
				
			||||||
 | 
									    &grid_default_cell);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user