summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/screen-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2018-11-12 14:18:11 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2018-11-12 14:18:11 +0000
commitc331e297d58751510813f05e89fe8f43e6f59c02 (patch)
treed5ad599aadf958b9074b076fb3d59fc37b08dc2e /usr.bin/tmux/screen-write.c
parentf2d3cbfe0dd6be6b43cd81d5ace56bee4eb94c4f (diff)
Allow style #[] in mode formats.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r--usr.bin/tmux/screen-write.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c
index 71e44ce1d6b..eead4549b13 100644
--- a/usr.bin/tmux/screen-write.c
+++ b/usr.bin/tmux/screen-write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-write.c,v 1.141 2018/10/31 10:05:47 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.142 2018/11/12 14:18:10 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -350,7 +350,6 @@ screen_write_cnputs(struct screen_write_ctx *ctx, ssize_t maxlen,
ptr = last + 1;
continue;
}
-
if (*ptr > 0x7f && utf8_open(ud, *ptr) == UTF8_MORE) {
ptr++;
@@ -376,7 +375,9 @@ screen_write_cnputs(struct screen_write_ctx *ctx, ssize_t maxlen,
if (maxlen > 0 && size + 1 > (size_t)maxlen)
break;
- if (*ptr > 0x1f && *ptr < 0x7f) {
+ if (*ptr == '\001')
+ gc.attr ^= GRID_ATTR_CHARSET;
+ else if (*ptr > 0x1f && *ptr < 0x7f) {
size++;
screen_write_putc(ctx, &gc, *ptr);
}