mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Don't print wide characters at screen width - 1. Matches uterm behaviour and
is probably a better idea anyway.
This commit is contained in:
		@@ -1006,6 +1006,14 @@ screen_write_cell(
 | 
			
		||||
 	} else
 | 
			
		||||
		width = 1;
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	 * If this is a wide character and there is no room on the screen, for
 | 
			
		||||
	 * the entire character, don't print it.
 | 
			
		||||
	 */
 | 
			
		||||
	if (width > 1 && (width > screen_size_x(s) ||
 | 
			
		||||
	    (s->cx != screen_size_x(s) && s->cx > screen_size_x(s) - width)))
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	/* If the width is zero, combine onto the previous character. */
 | 
			
		||||
	if (width == 0) {
 | 
			
		||||
		if (s->cx == 0)
 | 
			
		||||
@@ -1037,14 +1045,6 @@ screen_write_cell(
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* If the character is wider than the screen, don't print it. */
 | 
			
		||||
	if (width > screen_size_x(s)) {
 | 
			
		||||
		memcpy(&tmp_gc, gc, sizeof tmp_gc);
 | 
			
		||||
		tmp_gc.data = '_';
 | 
			
		||||
		width = 1;
 | 
			
		||||
		gc = &tmp_gc;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* Initialise the redraw context, saving the last cell. */
 | 
			
		||||
	screen_write_initctx(ctx, &ttyctx, 1);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user