summaryrefslogtreecommitdiff
path: root/usr.bin/mg/cmode.c
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>2008-09-15 16:13:36 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>2008-09-15 16:13:36 +0000
commit46afcbd52cae880b9a7eb20df81241e1f99a64cb (patch)
treee7f8293c9d96e318bdccb005f328c5824f50f1d8 /usr.bin/mg/cmode.c
parent0b98546c7b94e0858d8daad1b96091ba91734f4b (diff)
Expose the undo commands as proper mg functions.
This should have no functional change on undo, but it does facilitate testing undo behavior.
Diffstat (limited to 'usr.bin/mg/cmode.c')
-rw-r--r--usr.bin/mg/cmode.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/mg/cmode.c b/usr.bin/mg/cmode.c
index e728a8eccf2..ed9598011f1 100644
--- a/usr.bin/mg/cmode.c
+++ b/usr.bin/mg/cmode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmode.c,v 1.4 2008/06/14 08:39:30 kjell Exp $ */
+/* $OpenBSD: cmode.c,v 1.5 2008/09/15 16:13:35 kjell Exp $ */
/*
* This file is in the public domain.
*
@@ -164,8 +164,7 @@ cc_indent(int f, int n)
if (n < 0)
return (FALSE);
- undo_add_boundary();
- undo_boundary_enable(FALSE);
+ undo_boundary_enable(FFRAND, 0);
if (cc_strip_trailp)
deltrailwhite(FFRAND, 1);
@@ -188,8 +187,7 @@ cc_indent(int f, int n)
else
ret = indent(FFOTHARG, pi + ci);
- undo_boundary_enable(TRUE);
- undo_add_boundary();
+ undo_boundary_enable(FFRAND, 1);
return (ret);
}