mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Nuke the utf8 and status-utf8 options and make tmux only a UTF-8
terminal. We still support non-UTF-8 terminals outside tmux, but inside it is always UTF-8 (as when the utf8 and status-utf8 options were on).
This commit is contained in:
		@@ -280,13 +280,11 @@ window_copy_vadd(struct window_pane *wp, const char *fmt, va_list ap)
 | 
			
		||||
	struct screen			*backing = data->backing;
 | 
			
		||||
	struct screen_write_ctx	 	 back_ctx, ctx;
 | 
			
		||||
	struct grid_cell		 gc;
 | 
			
		||||
	int				 utf8flag;
 | 
			
		||||
	u_int				 old_hsize, old_cy;
 | 
			
		||||
 | 
			
		||||
	if (backing == &wp->base)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	utf8flag = options_get_number(wp->window->options, "utf8");
 | 
			
		||||
	memcpy(&gc, &grid_default_cell, sizeof gc);
 | 
			
		||||
 | 
			
		||||
	old_hsize = screen_hsize(data->backing);
 | 
			
		||||
@@ -301,7 +299,7 @@ window_copy_vadd(struct window_pane *wp, const char *fmt, va_list ap)
 | 
			
		||||
	} else
 | 
			
		||||
		data->backing_written = 1;
 | 
			
		||||
	old_cy = backing->cy;
 | 
			
		||||
	screen_write_vnputs(&back_ctx, 0, &gc, utf8flag, fmt, ap);
 | 
			
		||||
	screen_write_vnputs(&back_ctx, 0, &gc, fmt, ap);
 | 
			
		||||
	screen_write_stop(&back_ctx);
 | 
			
		||||
 | 
			
		||||
	data->oy += screen_hsize(data->backing) - old_hsize;
 | 
			
		||||
@@ -1021,19 +1019,18 @@ window_copy_search_up(struct window_pane *wp, const char *searchstr)
 | 
			
		||||
	struct grid_cell	 	 gc;
 | 
			
		||||
	size_t				 searchlen;
 | 
			
		||||
	u_int				 i, last, fx, fy, px;
 | 
			
		||||
	int				 utf8flag, n, wrapped, wrapflag, cis;
 | 
			
		||||
	int				 n, wrapped, wrapflag, cis;
 | 
			
		||||
	const char			*ptr;
 | 
			
		||||
 | 
			
		||||
	if (*searchstr == '\0')
 | 
			
		||||
		return;
 | 
			
		||||
	utf8flag = options_get_number(wp->window->options, "utf8");
 | 
			
		||||
	wrapflag = options_get_number(wp->window->options, "wrap-search");
 | 
			
		||||
	searchlen = screen_write_strlen(utf8flag, "%s", searchstr);
 | 
			
		||||
	searchlen = screen_write_strlen("%s", searchstr);
 | 
			
		||||
 | 
			
		||||
	screen_init(&ss, searchlen, 1, 0);
 | 
			
		||||
	screen_write_start(&ctx, NULL, &ss);
 | 
			
		||||
	memcpy(&gc, &grid_default_cell, sizeof gc);
 | 
			
		||||
	screen_write_nputs(&ctx, -1, &gc, utf8flag, "%s", searchstr);
 | 
			
		||||
	screen_write_nputs(&ctx, -1, &gc, "%s", searchstr);
 | 
			
		||||
	screen_write_stop(&ctx);
 | 
			
		||||
 | 
			
		||||
	fx = data->cx;
 | 
			
		||||
@@ -1088,19 +1085,18 @@ window_copy_search_down(struct window_pane *wp, const char *searchstr)
 | 
			
		||||
	struct grid_cell	 	 gc;
 | 
			
		||||
	size_t				 searchlen;
 | 
			
		||||
	u_int				 i, first, fx, fy, px;
 | 
			
		||||
	int				 utf8flag, n, wrapped, wrapflag, cis;
 | 
			
		||||
	int				 n, wrapped, wrapflag, cis;
 | 
			
		||||
	const char			*ptr;
 | 
			
		||||
 | 
			
		||||
	if (*searchstr == '\0')
 | 
			
		||||
		return;
 | 
			
		||||
	utf8flag = options_get_number(wp->window->options, "utf8");
 | 
			
		||||
	wrapflag = options_get_number(wp->window->options, "wrap-search");
 | 
			
		||||
	searchlen = screen_write_strlen(utf8flag, "%s", searchstr);
 | 
			
		||||
	searchlen = screen_write_strlen("%s", searchstr);
 | 
			
		||||
 | 
			
		||||
	screen_init(&ss, searchlen, 1, 0);
 | 
			
		||||
	screen_write_start(&ctx, NULL, &ss);
 | 
			
		||||
	memcpy(&gc, &grid_default_cell, sizeof gc);
 | 
			
		||||
	screen_write_nputs(&ctx, -1, &gc, utf8flag, "%s", searchstr);
 | 
			
		||||
	screen_write_nputs(&ctx, -1, &gc, "%s", searchstr);
 | 
			
		||||
	screen_write_stop(&ctx);
 | 
			
		||||
 | 
			
		||||
	fx = data->cx;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user