Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2017-05-11 14:01:10 +01:00
commit 99582befc4
2 changed files with 8 additions and 4 deletions

View File

@ -943,9 +943,9 @@ screen_write_clearstartofscreen(struct screen_write_ctx *ctx, u_int bg)
if (s->cy > 0)
grid_view_clear(s->grid, 0, 0, sx, s->cy, bg);
if (s->cx > sx - 1)
grid_view_clear(s->grid, 0, s->cy, sx, 1, 8);
grid_view_clear(s->grid, 0, s->cy, sx, 1, bg);
else
grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1, 8);
grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1, bg);
screen_write_collect_clear(ctx, 0, s->cy);
screen_write_collect_flush(ctx, 0);

8
tty.c
View File

@ -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;