diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2024-11-05 15:54:13 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2024-11-05 15:54:13 +0000 |
commit | 2ba68fd0ee61ed692da08bd93e9641122aac4682 (patch) | |
tree | 2659f177782cbecf11ce497af9582797536af9b5 /sys/dev | |
parent | 79288acd77a6bbfae35ab217ace1644249236e27 (diff) |
Implement CSI s and CSI u to save and restore cursor position. These are
supported by the FreeBSD syscon and some software assumes running on *BSD
implies they work.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/wscons/wsemul_vt100_subr.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsemul_vt100_subr.c b/sys/dev/wscons/wsemul_vt100_subr.c index 32dfebfa553..573aa52ec79 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.31 2024/11/05 08:12:08 miod Exp $ */ +/* $OpenBSD: wsemul_vt100_subr.c,v 1.32 2024/11/05 15:54:12 miod Exp $ */ /* $NetBSD: wsemul_vt100_subr.c,v 1.7 2000/04/28 21:56:16 mycroft Exp $ */ /* @@ -739,6 +739,17 @@ wsemul_vt100_handle_csi(struct wsemul_vt100_emuldata *edp, edp->scrreg_startrow : 0); edp->ccol = 0; break; + case 's': + edp->flags |= VTFL_SAVEDCURS; + edp->savedcursor_row = edp->crow; + edp->savedcursor_col = edp->ccol; + break; + case 'u': + if (edp->flags & VTFL_SAVEDCURS) { + edp->crow = edp->savedcursor_row; + edp->ccol = edp->savedcursor_col; + } + break; case 'y': switch (ARG(0)) { case 4: /* DECTST invoke confidence test */ |