From 8f3bbcbc0561e5ad363ede507f45da8ff6a2354d Mon Sep 17 00:00:00 2001 From: Kjell Wooding Date: Mon, 15 Sep 2008 16:13:36 +0000 Subject: Expose the undo commands as proper mg functions. This should have no functional change on undo, but it does facilitate testing undo behavior. --- usr.bin/mg/util.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'usr.bin/mg/util.c') 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); } -- cgit v1.2.3