aboutsummaryrefslogtreecommitdiff
path: root/screen-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/screen-write.c b/screen-write.c
index ee038e7d..ce9411b6 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -210,8 +210,12 @@ screen_write_vnputs(struct screen_write_ctx *ctx, ssize_t maxlen,
if (maxlen > 0 && size + 1 > (size_t) maxlen)
break;
- size++;
- screen_write_putc(ctx, gc, *ptr);
+ if (*ptr == '\001')
+ gc->attr ^= GRID_ATTR_CHARSET;
+ else {
+ size++;
+ screen_write_putc(ctx, gc, *ptr);
+ }
ptr++;
}
}