summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2011-08-04 04:18:42 +0000
committermiod <miod@openbsd.org>2011-08-04 04:18:42 +0000
commite28d8c28efcb5a66678a684692be0aa67b484266 (patch)
treea3953751579eb24386bc9d459bdb6f786ef33384
parentAdd support for hppa64 based on the defaults for 64-bit HP-UX as found in the (diff)
downloadwireguard-openbsd-e28d8c28efcb5a66678a684692be0aa67b484266.tar.xz
wireguard-openbsd-e28d8c28efcb5a66678a684692be0aa67b484266.zip
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@
-rw-r--r--sys/dev/wscons/wsemul_vt100.c10
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) {