-/* $OpenBSD: screen-write.c,v 1.194 2021/06/10 07:43:44 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.195 2021/08/06 07:32:21 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
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)
{
-/* $OpenBSD: tty.c,v 1.396 2021/08/06 03:29:15 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.397 2021/08/06 07:32:21 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
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++;
}
}