diff options
author | 2015-11-12 11:09:11 +0000 | |
---|---|---|
committer | 2015-11-12 11:09:11 +0000 | |
commit | f650d6ad18cb77553159506843486403e9ee26e9 (patch) | |
tree | 0e65fbaea69865b4897d076faf4105b63cb53b4b /usr.bin/tmux/paste.c | |
parent | Remove the mouse_utf8_flag format as well. (diff) | |
download | wireguard-openbsd-f650d6ad18cb77553159506843486403e9ee26e9.tar.xz wireguard-openbsd-f650d6ad18cb77553159506843486403e9ee26e9.zip |
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 'usr.bin/tmux/paste.c')
-rw-r--r-- | usr.bin/tmux/paste.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/tmux/paste.c b/usr.bin/tmux/paste.c index c500a47db2b..3011f66db95 100644 --- a/usr.bin/tmux/paste.c +++ b/usr.bin/tmux/paste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paste.c,v 1.32 2015/10/27 15:58:42 nicm Exp $ */ +/* $OpenBSD: paste.c,v 1.33 2015/11/12 11:09:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); |