diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-08-04 04:18:43 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-08-04 04:18:43 +0000 |
commit | c771279948ba726319b4ec1fa1dbdf4d5bd7a8b5 (patch) | |
tree | 308c3949259789af63ea4dadf6e17bd0f8eab86a /sys/dev | |
parent | 63c8753a99259fdff7d9f0c01d01c9a7ab296715 (diff) |
In `string' state, accept bell (^G) as an end of sequence in addition to
`ESC \', as supported by xterm; some third-party software such as
ncmpcpp rely upon this.
Noticed by dcoppa@, based on a draft diff by nicm@; ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/wscons/wsemul_vt100.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/wscons/wsemul_vt100.c b/sys/dev/wscons/wsemul_vt100.c index 854e18002df..a6cf840918c 100644 --- a/sys/dev/wscons/wsemul_vt100.c +++ b/sys/dev/wscons/wsemul_vt100.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_vt100.c,v 1.27 2010/09/01 21:17:16 nicm Exp $ */ +/* $OpenBSD: wsemul_vt100.c,v 1.28 2011/08/04 04:18:42 miod Exp $ */ /* $NetBSD: wsemul_vt100.c,v 1.13 2000/04/28 21:56:16 mycroft Exp $ */ /* @@ -386,7 +386,13 @@ wsemul_vt100_output_c0c1(struct wsemul_vt100_emuldata *edp, u_char c, /* ignore */ break; case ASCII_BEL: - wsdisplay_emulbell(edp->cbcookie); + if (edp->state == VT100_EMUL_STATE_STRING) { + /* acts as an equivalent to the ``ESC \'' string end */ + wsemul_vt100_handle_dcs(edp); + edp->state = VT100_EMUL_STATE_NORMAL; + } else { + wsdisplay_emulbell(edp->cbcookie); + } break; case ASCII_BS: if (edp->ccol > 0) { |