aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2017-05-11 11:38:49 +0000
committernicm <nicm>2017-05-11 11:38:49 +0000
commit989cdca95fa2e1a4dc3849020838328aded09164 (patch)
tree53d9a036cca0c10d12870b3d0b2f49a555f4330f /tty.c
parent349cdd6110b548db2f47bd458fef257260052dbc (diff)
downloadrtmux-989cdca95fa2e1a4dc3849020838328aded09164.tar.gz
rtmux-989cdca95fa2e1a4dc3849020838328aded09164.tar.bz2
rtmux-989cdca95fa2e1a4dc3849020838328aded09164.zip
Need to redraw out to cellsize (total cells used in a line) rather than
cellused (only non-space cells) because there may be cells with a nondefault background.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 5fb56148..18e4c3d2 100644
--- a/tty.c
+++ b/tty.c
@@ -846,9 +846,13 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp,
tty_region_off(tty);
tty_margin_off(tty);
+ /*
+ * Clamp the width to cellsize - note this is not cellused, because
+ * there may be empty background cells after it (from BCE).
+ */
sx = screen_size_x(s);
- if (sx > s->grid->linedata[s->grid->hsize + py].cellused)
- sx = s->grid->linedata[s->grid->hsize + py].cellused;
+ if (sx > s->grid->linedata[s->grid->hsize + py].cellsize)
+ sx = s->grid->linedata[s->grid->hsize + py].cellsize;
if (sx > tty->sx)
sx = tty->sx;