summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authornicm <nicm>2019-03-12 07:39:27 +0000
committernicm <nicm>2019-03-12 07:39:27 +0000
commitff4c80d53df96bb46eaa64107673e42d402f0d49 (patch)
tree8f32d4f8c655255ed0d427cf723fce2d32887779 /input.c
parentde730f68a4bc97e26f8f5dcb404ed27dc489c0fd (diff)
Add support for origin mode (DECOM, SM/RM ?6), from Marc Reisner.
Diffstat (limited to 'input.c')
-rw-r--r--input.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/input.c b/input.c
index 12527264..c498bc50 100644
--- a/input.c
+++ b/input.c
@@ -1572,6 +1572,10 @@ input_csi_dispatch_rm_private(struct input_ctx *ictx)
screen_write_clearscreen(&ictx->ctx,
ictx->cell.cell.bg);
break;
+ case 6: /* DECOM */
+ screen_write_mode_clear(&ictx->ctx, MODE_ORIGIN);
+ screen_write_cursormove(&ictx->ctx, 0, 0);
+ break;
case 7: /* DECAWM */
screen_write_mode_clear(&ictx->ctx, MODE_WRAP);
break;
@@ -1655,6 +1659,10 @@ input_csi_dispatch_sm_private(struct input_ctx *ictx)
screen_write_clearscreen(&ictx->ctx,
ictx->cell.cell.bg);
break;
+ case 6: /* DECOM */
+ screen_write_mode_set(&ictx->ctx, MODE_ORIGIN);
+ screen_write_cursormove(&ictx->ctx, 0, 0);
+ break;
case 7: /* DECAWM */
screen_write_mode_set(&ictx->ctx, MODE_WRAP);
break;