tweak cursor positioning. fix for esc [ ; H, etc

This commit is contained in:
Kelvin Sherlock 2018-05-13 08:42:14 -04:00
parent b838f724d8
commit 58e63dc252
1 changed files with 11 additions and 5 deletions

16
vt100.c
View File

@ -170,15 +170,15 @@ static void cursor_position(void) {
if (y) --y;
if (x) --x;
__x = x;
if (x >= 80) x = 79;
if (DECOM) {
__y = window[0] + y;
if (__y > window[1]) __y = window[1];
y = window[0] + y;
if (y > window[1]) y = window[1];
} else {
__y = y;
if (__y >= 24) __y = 23;
if (y >= 24) y = 23;
}
__x = x;
__y = y;
}
static void cursor_position_vt52(void) {
@ -548,6 +548,12 @@ void vt100_process(const unsigned char *buffer, unsigned buffer_size) {
state = st_parm;
break;
}
if (c == ';') {
++parm_count;
parms[parm_count] = 0;
state = st_parm;
break;
}
/* fall through */
case st_lbracket2:
lbracket2: