]> granicus.if.org Git - vim/commitdiff
updated for version 7.2.441
authorBram Moolenaar <Bram@vim.org>
Sun, 30 May 2010 14:55:22 +0000 (16:55 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 30 May 2010 14:55:22 +0000 (16:55 +0200)
Problem:    When using ":earlier" undo information may be wrong.
Solution:   When changing alternate branches also adjust b_u_oldhead.

src/undo.c

index 7f1aa8ad87517ea0c744f9116399e4565714cba5..cb51c996c22e6c52e5c996d22a73ee94abaceca9 100644 (file)
@@ -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;