summaryrefslogtreecommitdiff
path: root/usr.bin/mg/util.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
commit8f3bbcbc0561e5ad363ede507f45da8ff6a2354d (patch)
treec42a9bbf45e291cac53a138c9556be9a77d0152e /usr.bin/mg/util.c
parentd1436874c326a3e1a5ac8a746fe2651ee54493b1 (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/util.c')
-rw-r--r--usr.bin/mg/util.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/mg/util.c b/usr.bin/mg/util.c
index 0c100804bf9..3e0c691d8b3 100644
--- a/usr.bin/mg/util.c
+++ b/usr.bin/mg/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.25 2008/06/11 23:18:33 kjell Exp $ */
+/* $OpenBSD: util.c,v 1.26 2008/09/15 16:13:35 kjell Exp $ */
/* This file is in the public domain. */
@@ -119,8 +119,7 @@ twiddle(int f, int n)
dotp = curwp->w_dotp;
doto = curwp->w_doto;
- undo_add_boundary();
- undo_boundary_enable(FALSE);
+ undo_boundary_enable(FFRAND, 0);
if (doto == llength(dotp)) {
if (--doto <= 0)
return (FALSE);
@@ -136,8 +135,7 @@ twiddle(int f, int n)
linsert(1, cr);
if (fudge != TRUE)
(void)backchar(FFRAND, 1);
- undo_boundary_enable(TRUE);
- undo_add_boundary();
+ undo_boundary_enable(FFRAND, 1);
lchange(WFEDIT);
return (TRUE);
}