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:
nicm
2015-11-12 11:09:11 +00:00
parent a0f3999ce7
commit 1b86f520ea
13 changed files with 82 additions and 149 deletions

View File

@ -275,7 +275,7 @@ paste_set(char *data, size_t size, const char *name, char **cause)
/* Convert start of buffer into a nice string. */
char *
paste_make_sample(struct paste_buffer *pb, int utf8flag)
paste_make_sample(struct paste_buffer *pb)
{
char *buf;
size_t len, used;
@ -287,10 +287,7 @@ paste_make_sample(struct paste_buffer *pb, int utf8flag)
len = width;
buf = xreallocarray(NULL, len, 4 + 4);
if (utf8flag)
used = utf8_strvis(buf, pb->data, len, flags);
else
used = strvisx(buf, pb->data, len, flags);
used = utf8_strvis(buf, pb->data, len, flags);
if (pb->size > width || used > width)
strlcpy(buf + width, "...", 4);
return (buf);