summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2023-01-12 12:23:41 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2023-01-12 12:23:41 +0000
commit422410b455f985bdca129c34596da7c7cdf2ac05 (patch)
treed8b069417995621ed239a30445e56b68760a2bfd /sys
parentd9a36a6502c1c5b7b53140e758fa12da60db013d (diff)
Add some missing cursor movement and scrolling escape sequences that are
supported by xterm. From Crystal Kolipe kolipe.c at exoticsilicon dot com. ok miod
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/wscons/wsemul_vt100_subr.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsemul_vt100_subr.c b/sys/dev/wscons/wsemul_vt100_subr.c
index f0676f6b8c4..e97d65bbb8e 100644
--- a/sys/dev/wscons/wsemul_vt100_subr.c
+++ b/sys/dev/wscons/wsemul_vt100_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsemul_vt100_subr.c,v 1.25 2023/01/09 07:48:12 nicm Exp $ */
+/* $OpenBSD: wsemul_vt100_subr.c,v 1.26 2023/01/12 12:23:40 nicm Exp $ */
/* $NetBSD: wsemul_vt100_subr.c,v 1.7 2000/04/28 21:56:16 mycroft Exp $ */
/*
@@ -461,6 +461,10 @@ wsemul_vt100_handle_csi(struct wsemul_vt100_emuldata *edp,
edp->ccol -= min(DEF1_ARG(0), edp->ccol);
edp->flags &= ~VTFL_LASTCHAR;
break;
+ case 'G': /* CHA */
+ case '`': /* HPA */
+ edp->ccol = min(DEF1_ARG(0), edp->ncols) - 1;
+ break;
case 'H': /* CUP */
case 'f': /* HVP */
if (edp->flags & VTFL_DECOM)
@@ -502,6 +506,12 @@ wsemul_vt100_handle_csi(struct wsemul_vt100_emuldata *edp,
WSEMULOP(rc, edp, &edp->abortstate, erasecols,
ERASECOLS(NCOLS - n, n, edp->bkgdattr));
break;
+ case 'S': /* SU scroll up */
+ wsemul_vt100_scrollup(edp, DEF1_ARG(0));
+ break;
+ case 'T': /* SD scroll down */
+ wsemul_vt100_scrolldown(edp, DEF1_ARG(0));
+ break;
case 'X': /* ECH erase character */
n = min(DEF1_ARG(0), COLS_LEFT + 1);
WSEMULOP(rc, edp, &edp->abortstate, erasecols,
@@ -512,6 +522,9 @@ wsemul_vt100_handle_csi(struct wsemul_vt100_emuldata *edp,
wsdisplay_emulinput(edp->cbcookie, WSEMUL_VT_ID1,
sizeof(WSEMUL_VT_ID1) - 1);
break;
+ case 'd': /* VPA */
+ edp->crow = min(DEF1_ARG(0), edp->nrows) - 1;
+ break;
case 'g': /* TBC */
if (edp->tabs != NULL)
switch (ARG(0)) {