mirror of
https://github.com/ksherlock/marlene.git
synced 2025-04-10 23:41:38 +00:00
tweak cursor positioning. fix for esc [ ; H, etc
This commit is contained in:
parent
b838f724d8
commit
58e63dc252
16
vt100.c
16
vt100.c
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user