4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When using a mix of undo and "g-" it may no longer be possible to
12 go to every point in the undo tree. (Andy Wokula)
13 Solution: Correctly update pointers in the undo tree.
17 *** ../vim-7.0.181/src/undo.c Tue Aug 29 17:28:56 2006
18 --- src/undo.c Tue Jan 9 20:18:27 2007
21 uhp->uh_alt_next = old_curhead;
22 if (old_curhead != NULL)
24 old_curhead->uh_alt_prev = uhp;
25 if (curbuf->b_u_oldhead == old_curhead)
26 curbuf->b_u_oldhead = uhp;
28 ! uhp->uh_alt_prev = NULL;
29 if (curbuf->b_u_newhead != NULL)
30 curbuf->b_u_newhead->uh_prev = uhp;
33 uhp->uh_alt_next = old_curhead;
34 if (old_curhead != NULL)
36 + uhp->uh_alt_prev = old_curhead->uh_alt_prev;
37 + if (uhp->uh_alt_prev != NULL)
38 + uhp->uh_alt_prev->uh_alt_next = uhp;
39 old_curhead->uh_alt_prev = uhp;
40 if (curbuf->b_u_oldhead == old_curhead)
41 curbuf->b_u_oldhead = uhp;
44 ! uhp->uh_alt_prev = NULL;
45 if (curbuf->b_u_newhead != NULL)
46 curbuf->b_u_newhead->uh_prev = uhp;
51 uhp = curbuf->b_u_curhead;
54 + /* Go back to the first branch with a mark. */
55 + while (uhp->uh_alt_prev != NULL
56 + && uhp->uh_alt_prev->uh_walk == mark)
57 + uhp = uhp->uh_alt_prev;
59 /* Find the last branch with a mark, that's the one. */
61 while (last->uh_alt_next != NULL
66 /* Make the used branch the first entry in the list of
67 * alternatives to make "u" and CTRL-R take this branch. */
68 + while (uhp->uh_alt_prev != NULL)
69 + uhp = uhp->uh_alt_prev;
70 if (last->uh_alt_next != NULL)
71 last->uh_alt_next->uh_alt_prev = last->uh_alt_prev;
72 last->uh_alt_prev->uh_alt_next = last->uh_alt_next;
73 *** ../vim-7.0.181/src/version.c Tue Jan 9 15:43:39 2007
74 --- src/version.c Tue Jan 9 20:26:47 2007
78 { /* Add new patch number below this line */
84 hundred-and-one symptoms of being an internet addict:
85 13. You refer to going to the bathroom as downloading.
87 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
88 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
89 \\\ download, build and distribute -- http://www.A-A-P.org ///
90 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///