aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-23 12:11:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-23 12:11:35 +0000
commit9e47c89880f782300d799869d5adc531bc2ce562 (patch)
treeec654cf26ebcd0d7164c2deaec209d10d4826103
parentvt: dummy implementation of ESC dispatch (diff)
csi: implement 'CSI H' (set cursor position)
-rw-r--r--csi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/csi.c b/csi.c
index e4f47da5..3b6f8896 100644
--- a/csi.c
+++ b/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 */