summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-30 16:55:22 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-30 16:55:22 +0200
commit8f1f629d853d8c4de8bacf69fda769ce791fadb2 (patch)
tree15b641ec3ef4aee5a7137e3093f8bb5a8ee4f332 /src/undo.c
parent6773b2ba7e716cfa89a71b8a3a1ed98ffb186646 (diff)
downloadvim-8f1f629d853d8c4de8bacf69fda769ce791fadb2.zip
updated for version 7.2.441
Problem: When using ":earlier" undo information may be wrong. Solution: When changing alternate branches also adjust b_u_oldhead.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/undo.c b/src/undo.c
index 7f1aa8ad8..cb51c996c 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1918,6 +1918,8 @@ undo_time(step, sec, absolute)
last->uh_alt_next = uhp;
uhp->uh_alt_prev = last;
+ if (curbuf->b_u_oldhead == uhp)
+ curbuf->b_u_oldhead = last;
uhp = last;
if (uhp->uh_next != NULL)
uhp->uh_next->uh_prev = uhp;