summaryrefslogtreecommitdiff
path: root/usr.bin/mg/undo.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mg/undo.c')
-rw-r--r--usr.bin/mg/undo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mg/undo.c b/usr.bin/mg/undo.c
index 2087c85a524..769f40fd1a7 100644
--- a/usr.bin/mg/undo.c
+++ b/usr.bin/mg/undo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: undo.c,v 1.13 2002/08/22 23:28:19 deraadt Exp $ */
+/* $OpenBSD: undo.c,v 1.14 2002/09/15 22:18:39 vincent Exp $ */
/*
* Copyright (c) 2002 Vincent Labrecque
* All rights reserved.
@@ -182,9 +182,9 @@ last_was_boundary()
int
undo_enable(int on)
{
- undo_disable_flag = on ? 0 : 1;
-
- return (on);
+ int pon = undo_disable_flag;
+ undo_disable_flag = (on == TRUE) ? 0 : 1;
+ return (pon ? FALSE : TRUE);
}
int