diff src/undo.c @ 5448:9818311eeca0 v7.4.074

updated for version 7.4.074 Problem: When undo'ing all changes and creating a new change the undo structure is incorrect. (Christian Brabandt) Solution: When deleting the branch starting at the old header, delete the whole branch, not just the first entry.
author Bram Moolenaar <bram@vim.org>
date Thu, 07 Nov 2013 03:04:11 +0100
parents d0595545e98a
children be61f315eafe
line wrap: on
line diff
--- a/src/undo.c
+++ b/src/undo.c
@@ -3121,7 +3121,8 @@ u_freebranch(buf, uhp, uhpp)
      * all the pointers. */
     if (uhp == buf->b_u_oldhead)
     {
-	u_freeheader(buf, uhp, uhpp);
+	while (buf->b_u_oldhead != NULL)
+	    u_freeheader(buf, buf->b_u_oldhead, uhpp);
 	return;
     }