summaryrefslogtreecommitdiffstats
path: root/paste.c
diff options
context:
space:
mode:
authornicm <nicm>2015-11-12 11:09:11 +0000
committernicm <nicm>2015-11-12 11:09:11 +0000
commit1b86f520ea1620628e569ea833c7b13306c18a4e (patch)
tree02c4aa83f31f42b1128171e9b6a0a566e564e416 /paste.c
parenta0f3999ce7b6df32324b493fa3c8007de93d2c48 (diff)
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).
Diffstat (limited to 'paste.c')
-rw-r--r--paste.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/paste.c b/paste.c
index ad3b56b5..5f60914f 100644
--- a/paste.c
+++ b/paste.c
@@ -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);