aboutsummaryrefslogtreecommitdiff
path: root/csi.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-24 17:59:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-24 17:59:54 +0000
commit0cf1253ac0eecd29c9b45b7095ce1b255dfc6e78 (patch)
tree0c6eb1d6f5cdb321eb47a7f8612ad00459e32ba9 /csi.c
parentcsi: saturate row/col when setting cursor position (diff)
csi: implement VPA (vertical line position absolute)
Diffstat (limited to 'csi.c')
-rw-r--r--csi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/csi.c b/csi.c
index 916be813..136a2afe 100644
--- a/csi.c
+++ b/csi.c
@@ -246,6 +246,15 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 'c':
return write(term->ptmx, "\033[?6c", 5) == 5;
+ case 'd': {
+ int row = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 1;
+ if (row == 0)
+ row = 1;
+
+ grid_cursor_to(&term->grid, row - 1, term->grid.cursor.col);
+ break;
+ }
+
case 'm':
return csi_sgr(term);