csi: implement 'CSI H' (set cursor position)

This commit is contained in:
Daniel Eklöf 2019-06-23 14:11:35 +02:00
parent 1ad9d118c2
commit 9e47c89880
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

9
csi.c
View file

@ -176,6 +176,15 @@ csi_dispatch(struct terminal *term, uint8_t final)
break;
}
case 'H': {
/* Move cursor */
int row = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 1;
int col = term->vt.params.idx > 1 ? term->vt.params.v[1].value : 1;
grid_cursor_to(&term->grid, row - 1, col - 1);
break;
}
case 'J': {
/* Erase screen */