summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lumsden <lum@cvs.openbsd.org>2016-01-03 19:37:09 +0000
committerMark Lumsden <lum@cvs.openbsd.org>2016-01-03 19:37:09 +0000
commit14fc242cfa334ffe836f8537c4e9522d60aba9b1 (patch)
tree1e0c778c44eb5d14a787536bfe6c2ddd737fbc66
parentaa25b8007f42e732f13ab3b9f6b22a10a4dc1a6e (diff)
Allow macro execution to continue without delay in the event of a
visble bell call.
-rw-r--r--usr.bin/mg/bell.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mg/bell.c b/usr.bin/mg/bell.c
index 3ee30cf1fe2..7c1753d797c 100644
--- a/usr.bin/mg/bell.c
+++ b/usr.bin/mg/bell.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bell.c,v 1.3 2015/03/19 21:22:15 bcallah Exp $ */
+/* $OpenBSD: bell.c,v 1.4 2016/01/03 19:37:08 lum Exp $ */
/*
* This file is in the public domain.
@@ -17,6 +17,7 @@
#include <unistd.h>
#include "def.h"
+#include "macro.h"
void
bellinit(void)
@@ -34,6 +35,8 @@ dobeep(void)
if (dovisiblebell) {
sgarbf = TRUE;
update(CNONE);
+ if (inmacro) /* avoid delaying macro execution. */
+ return;
usleep(50000);
}
}