summaryrefslogtreecommitdiff
path: root/usr.bin/mg/undo.c
diff options
context:
space:
mode:
authorMark Lumsden <lum@cvs.openbsd.org>2014-03-20 07:47:30 +0000
committerMark Lumsden <lum@cvs.openbsd.org>2014-03-20 07:47:30 +0000
commit6a0a6cdf1572523b52f30ca110ab358f5e088f18 (patch)
tree891437e7fbf1d01d5ed42b26a4eb03b841647009 /usr.bin/mg/undo.c
parent45063cff1b518142d40e1fc7d5212dc56ca6d266 (diff)
Add some missing dobeeps.
ok florian@
Diffstat (limited to 'usr.bin/mg/undo.c')
-rw-r--r--usr.bin/mg/undo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/mg/undo.c b/usr.bin/mg/undo.c
index f95da63e951..b8a4e88bf77 100644
--- a/usr.bin/mg/undo.c
+++ b/usr.bin/mg/undo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: undo.c,v 1.54 2013/06/01 16:27:56 lum Exp $ */
+/* $OpenBSD: undo.c,v 1.55 2014/03/20 07:47:29 lum Exp $ */
/*
* This file is in the public domain
*/
@@ -41,6 +41,7 @@ find_dot(struct line *lp, int off)
for (p = curbp->b_headp; p != lp; p = lforw(p)) {
if (count != 0) {
if (p == curbp->b_headp) {
+ dobeep();
ewprintf("Error: Undo stuff called with a"
"nonexistent line");
return (FALSE);
@@ -421,6 +422,7 @@ undo_dump(int f, int n)
}
snprintf(tmp, sizeof(tmp), " [%d]", rec->region.r_size);
if (strlcat(buf, tmp, sizeof(buf)) >= sizeof(buf)) {
+ dobeep();
ewprintf("Undo record too large. Aborted.");
return (FALSE);
}
@@ -507,6 +509,7 @@ undo(int f, int n)
* its creation.
*/
if (ptr == NULL) {
+ dobeep();
ewprintf("No further undo information");
rval = FALSE;
nulled = TRUE;
@@ -536,6 +539,7 @@ undo(int f, int n)
if (ptr->type != BOUNDARY && ptr->type != MODIFIED) {
if (find_lo(ptr->pos, &lp,
&offset, &lineno) == FALSE) {
+ dobeep();
ewprintf("Internal error in Undo!");
rval = FALSE;
break;