summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2013-03-25 11:39:39 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2013-03-25 11:39:39 +0000
commit1e501c4ae56a45f4a16d3e74a5868676a8d6022e (patch)
treefcf64d88fc256a377411999012a698f80736ed72
parentfefd2f6e3e0186cbb86e23043fd08fd2384c2978 (diff)
Correct line numbers for undo-list.
OK jasper@
-rw-r--r--usr.bin/mg/undo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/mg/undo.c b/usr.bin/mg/undo.c
index ab10a452272..0976713ef2c 100644
--- a/usr.bin/mg/undo.c
+++ b/usr.bin/mg/undo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: undo.c,v 1.52 2013/03/25 11:38:22 florian Exp $ */
+/* $OpenBSD: undo.c,v 1.53 2013/03/25 11:39:38 florian Exp $ */
/*
* This file is in the public domain
*/
@@ -425,6 +425,12 @@ undo_dump(int f, int n)
}
addlinef(bp, "%s", buf);
}
+ for (wp = wheadp; wp != NULL; wp = wp->w_wndp) {
+ if (wp->w_bufp == bp) {
+ wp->w_dotline = num+1;
+ wp->w_rflag |= WFFULL;
+ }
+ }
return (TRUE);
}