Merge branch 'obsd-master' into master

pull/2824/head
Thomas Adam 2021-08-06 10:01:17 +01:00
commit 4bccff9556
2 changed files with 9 additions and 3 deletions

View File

@ -596,7 +596,7 @@ screen_write_hline(struct screen_write_ctx *ctx, u_int nx, int left, int right)
screen_write_set_cursor(ctx, cx, cy);
}
/* Draw a horizontal line on screen. */
/* Draw a vertical line on screen. */
void
screen_write_vline(struct screen_write_ctx *ctx, u_int ny, int top, int bottom)
{

10
tty.c
View File

@ -1463,9 +1463,15 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int px, u_int py, u_int nx,
tty_attributes(tty, &last, defaults, palette);
tty_cursor(tty, atx + ux, aty);
for (j = 0; j < gcp->data.width; j++) {
if (ux + j > nx)
if (ux > nx)
break;
tty_putc(tty, ' ');
if (tty_check_overlay(tty, atx + ux,
aty))
tty_putc(tty, ' ');
else {
tty_cursor(tty, atx + ux + 1,
aty);
}
ux++;
}
}