From 1b86f520ea1620628e569ea833c7b13306c18a4e Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 12 Nov 2015 11:09:11 +0000 Subject: 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). --- window-copy.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'window-copy.c') diff --git a/window-copy.c b/window-copy.c index d3e5b7d9..1c1ea29c 100644 --- a/window-copy.c +++ b/window-copy.c @@ -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; -- cgit v1.2.3