diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2006-11-17 08:45:32 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2006-11-17 08:45:32 +0000 |
commit | 78604d2745675cfadeb29e2681177ec9ec7a86b5 (patch) | |
tree | cb5fcc65baec512e18c4e85fcd32fcb904dcefe1 /usr.bin/mg/file.c | |
parent | 0029518af75b3a4e9416fd5a0f0b804e947f59a7 (diff) |
Fix a needless inversion of flag names; i.e. change them from the
negative to the positive. undo_boundary_enable(TRUE) makes a LOT more
sense than undo_no_boundary(FALSE).
While here, whack a global, and fix a bug noted by otto:
undoing a file insertion sometimes left stray characters around.
ok beck@, otto@
Diffstat (limited to 'usr.bin/mg/file.c')
-rw-r--r-- | usr.bin/mg/file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/mg/file.c b/usr.bin/mg/file.c index 234d310a54c..8b245c57de2 100644 --- a/usr.bin/mg/file.c +++ b/usr.bin/mg/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.62 2006/07/25 08:27:09 kjell Exp $ */ +/* $OpenBSD: file.c,v 1.63 2006/11/17 08:45:31 kjell Exp $ */ /* This file is in the public domain. */ @@ -283,12 +283,14 @@ insertfile(char *fname, char *newname, int replacebuf) struct line *lp1, *lp2; struct line *olp; /* line we started at */ struct mgwin *wp; - int nbytes, s, nline = 0, siz, x = -1, x2; + int nbytes, s, nline = 0, siz, x, x2; int opos; /* offset we started at */ int oline; /* original line number */ if (replacebuf == TRUE) x = undo_enable(FALSE); + else + x = undo_enabled(); lp1 = NULL; if (line == NULL) { |