diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/mode-tree.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/screen-write.c | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/tmux/mode-tree.c b/usr.bin/tmux/mode-tree.c index a1261e54190..46e9191b3a0 100644 --- a/usr.bin/tmux/mode-tree.c +++ b/usr.bin/tmux/mode-tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mode-tree.c,v 1.24 2018/08/02 11:44:07 nicm Exp $ */ +/* $OpenBSD: mode-tree.c,v 1.25 2018/11/12 14:18:10 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -582,10 +582,10 @@ mode_tree_draw(struct mode_tree_data *mtd) } if (i != mtd->current) { - screen_write_nputs(&ctx, w, &gc0, "%s", text); + screen_write_cnputs(&ctx, w, &gc0, "%s", text); screen_write_clearendofline(&ctx, 8); } else { - screen_write_nputs(&ctx, w, &gc, "%s", text); + screen_write_cnputs(&ctx, w, &gc, "%s", text); screen_write_clearendofline(&ctx, gc.bg); } free(text); 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); } |