mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Implement the DEC alignment test. With the last change this is enough for the
first cursor test in vttest (in ports) to pass; it still shops a few more problems though.
This commit is contained in:
@ -291,6 +291,31 @@ screen_write_cursorleft(struct screen_write_ctx *ctx, u_int nx)
|
||||
s->cx -= nx;
|
||||
}
|
||||
|
||||
/* VT100 alignment test. */
|
||||
void
|
||||
screen_write_alignmenttest(struct screen_write_ctx *ctx)
|
||||
{
|
||||
struct screen *s = ctx->s;
|
||||
struct grid_cell gc;
|
||||
u_int xx, yy;
|
||||
|
||||
memcpy(&gc, &grid_default_cell, sizeof gc);
|
||||
gc.data = 'E';
|
||||
|
||||
for (yy = 0; yy < screen_size_y(s); yy++) {
|
||||
for (xx = 0; xx < screen_size_x(s); xx++)
|
||||
grid_view_set_cell(s->grid, xx, yy, &gc);
|
||||
}
|
||||
|
||||
s->cx = 0;
|
||||
s->cy = 0;
|
||||
|
||||
s->rupper = 0;
|
||||
s->rlower = screen_size_y(s) - 1;
|
||||
|
||||
tty_write_cmd(ctx->wp, TTY_ALIGNMENTTEST);
|
||||
}
|
||||
|
||||
/* Insert nx characters. */
|
||||
void
|
||||
screen_write_insertcharacter(struct screen_write_ctx *ctx, u_int nx)
|
||||
|
Reference in New Issue
Block a user