diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2005-10-13 20:07:27 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2005-10-13 20:07:27 +0000 |
commit | f21a170b60a02a2fc608332aca181909c712ed3d (patch) | |
tree | 90a52edbd6662b5623c12f00b9e66c14fbb571b2 /usr.bin/mg/util.c | |
parent | 9ee74953a8d2f6281713f214fcd26090d3473680 (diff) |
Make undoing of a yank operation work as expected
(i.e. undo boundaries are placed around entire yanked block)
ok cloder@
Diffstat (limited to 'usr.bin/mg/util.c')
-rw-r--r-- | usr.bin/mg/util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/mg/util.c b/usr.bin/mg/util.c index f7c6fbcf654..46798521b54 100644 --- a/usr.bin/mg/util.c +++ b/usr.bin/mg/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.12 2005/06/14 18:14:40 kjell Exp $ */ +/* $OpenBSD: util.c,v 1.13 2005/10/13 20:07:26 kjell Exp $ */ /* This file is in the public domain. */ @@ -437,6 +437,8 @@ yank(int f, int n) /* newline counting */ nline = 0; + undo_add_boundary(); + undo_no_boundary(TRUE); while (n--) { /* mark around last yank */ isetmark(); @@ -464,6 +466,8 @@ yank(int f, int n) curwp->w_linep = lp; curwp->w_flag |= WFHARD; } + undo_no_boundary(FALSE); + undo_add_boundary(); return (TRUE); } |