diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-01-09 19:23:12 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-01-09 19:23:12 +0000 |
commit | 89ed3dfd87f2fa28037743b187ba706804c81a44 (patch) | |
tree | 61b15029ca3a59498c38632cac138600be5f1714 | |
parent | 9460b9d215821472ac18ec2a1d51b0c76c6f3cf0 (diff) | |
download | vim-git-89ed3dfd87f2fa28037743b187ba706804c81a44.tar.gz |
updated for version 7.0-182v7.0.182
-rw-r--r-- | src/undo.c | 13 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/undo.c b/src/undo.c index d56302d62..7167cabcc 100644 --- a/src/undo.c +++ b/src/undo.c @@ -341,11 +341,15 @@ u_savecommon(top, bot, newbot) uhp->uh_alt_next = old_curhead; if (old_curhead != NULL) { + uhp->uh_alt_prev = old_curhead->uh_alt_prev; + if (uhp->uh_alt_prev != NULL) + uhp->uh_alt_prev->uh_alt_next = uhp; old_curhead->uh_alt_prev = uhp; if (curbuf->b_u_oldhead == old_curhead) curbuf->b_u_oldhead = uhp; } - uhp->uh_alt_prev = NULL; + else + uhp->uh_alt_prev = NULL; if (curbuf->b_u_newhead != NULL) curbuf->b_u_newhead->uh_prev = uhp; @@ -856,6 +860,11 @@ undo_time(step, sec, absolute) uhp = curbuf->b_u_curhead; while (uhp != NULL) { + /* Go back to the first branch with a mark. */ + while (uhp->uh_alt_prev != NULL + && uhp->uh_alt_prev->uh_walk == mark) + uhp = uhp->uh_alt_prev; + /* Find the last branch with a mark, that's the one. */ last = uhp; while (last->uh_alt_next != NULL @@ -865,6 +874,8 @@ undo_time(step, sec, absolute) { /* Make the used branch the first entry in the list of * alternatives to make "u" and CTRL-R take this branch. */ + while (uhp->uh_alt_prev != NULL) + uhp = uhp->uh_alt_prev; if (last->uh_alt_next != NULL) last->uh_alt_next->uh_alt_prev = last->uh_alt_prev; last->uh_alt_prev->uh_alt_next = last->uh_alt_next; diff --git a/src/version.c b/src/version.c index 434059de2..db1d34fd5 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 182, +/**/ 181, /**/ 180, |