diff options
author | nicm <nicm> | 2018-11-12 14:18:10 +0000 |
---|---|---|
committer | nicm <nicm> | 2018-11-12 14:18:10 +0000 |
commit | 86e648d906d84b8b0522e3d8d6ec6baa171c2423 (patch) | |
tree | 104cc979ff50e416cb2e6c4c5d1f5cb456e3cccc /screen-write.c | |
parent | 09aee537632eba2c3fa5fe4559e0073dc4c67d68 (diff) |
Allow style #[] in mode formats.
Diffstat (limited to 'screen-write.c')
-rw-r--r-- | screen-write.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/screen-write.c b/screen-write.c index 00994e48..c65ae688 100644 --- a/screen-write.c +++ b/screen-write.c @@ -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); } |