mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-30 11:10:23 -04:00
csi: implement 'CSI H' (set cursor position)
This commit is contained in:
parent
1ad9d118c2
commit
9e47c89880
1 changed files with 9 additions and 0 deletions
9
csi.c
9
csi.c
|
|
@ -176,6 +176,15 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
||||||
break;
|
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': {
|
case 'J': {
|
||||||
/* Erase screen */
|
/* Erase screen */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue