mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05: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;
|
||||
}
|
||||
|
||||
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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue