Commit dc0f1510 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Implement CSI-K, tweak tests.

parent 945d2e1e
......@@ -18,4 +18,4 @@ client c1 {
rxresp
} -run
process p1 -need-bytes 2000 -screen_dump -write {q} -wait
process p1 -need-bytes 1000 -screen_dump -write {q} -wait
......@@ -24,4 +24,4 @@ process p1 -writeln {quit}
process p1 -need-bytes 400
process p1 -screen_dump -writeln {quit} -wait
process p1 -screen_dump -write "quit\r" -wait
......@@ -714,10 +714,11 @@ cmd_process(CMD_ARGS)
u = strtoumax(av[1], NULL, 0);
av++;
do {
usleep(100000);
usleep(500000);
AZ(pthread_mutex_lock(&p->mtx));
v = p->stdout_bytes;
AZ(pthread_mutex_unlock(&p->mtx));
vtc_log(p->vl, 4, "Have %ju bytes", v);
} while(v < u);
continue;
}
......
......@@ -119,6 +119,25 @@ term_escape(struct term *tp, int c, int n)
vtc_fatal(tp->vl, "ANSI J[%d]", tp->arg[0]);
term_clear(tp);
break;
case 'K':
// erase in line 0=right, 1=left, 2=full line
switch (tp->arg[0]) {
case 0:
for (i = tp->col + 1; i < tp->ncol; i++)
tp->vram[tp->line][i] = ' ';
break;
case 1:
for (i = 0; i < tp->col; i++)
tp->vram[tp->line][i] = ' ';
break;
case 2:
for (i = 0; i < tp->ncol; i++)
tp->vram[tp->line][i] = ' ';
break;
default:
vtc_fatal(tp->vl, "ANSI K[%d]", tp->arg[0]);
}
break;
case 'm':
// Ignore Graphic Rendition settings
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment