aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2018-01-16 17:03:18 +0000
committernicm <nicm>2018-01-16 17:03:18 +0000
commit75842bfe66d983580dddf11b676445d5b9fa9f8a (patch)
tree7f9c695a0af4a7ec1b9961691d3d707e98c4867a
parent5849b73b81c1218e57e9931c44e82f0d7c468cb1 (diff)
downloadrtmux-75842bfe66d983580dddf11b676445d5b9fa9f8a.tar.gz
rtmux-75842bfe66d983580dddf11b676445d5b9fa9f8a.tar.bz2
rtmux-75842bfe66d983580dddf11b676445d5b9fa9f8a.zip
Fix drawing of ACS characters (they need to go character-at-a-time),
accidentally broken in last commit.
-rw-r--r--tty.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tty.c b/tty.c
index 9c47ad6d..01208a25 100644
--- a/tty.c
+++ b/tty.c
@@ -977,17 +977,23 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp,
}
if (gcp->flags & GRID_FLAG_SELECTED)
- screen_select_cell(s, &last, &gc);
+ screen_select_cell(s, &last, gcp);
else
- memcpy(&last, &gc, sizeof last);
- if (ux + gcp->data.width > screen_size_x(s))
+ memcpy(&last, gcp, sizeof last);
+ if (ux + gcp->data.width > screen_size_x(s)) {
+ tty_attributes(tty, &last, wp);
for (j = 0; j < gcp->data.width; j++) {
if (ux + j > screen_size_x(s))
break;
tty_putc(tty, ' ');
ux++;
}
- else {
+ } else if (gcp->attr & GRID_ATTR_CHARSET) {
+ tty_attributes(tty, &last, wp);
+ for (j = 0; j < gcp->data.size; j++)
+ tty_putc(tty, gcp->data.data[j]);
+ ux += gc.data.width;
+ } else {
memcpy(buf + len, gcp->data.data, gcp->data.size);
len += gcp->data.size;
width += gcp->data.width;