8387bf1
To: vim-dev@vim.org
8387bf1
Subject: Patch 7.1.155
8387bf1
Fcc: outbox
8387bf1
From: Bram Moolenaar <Bram@moolenaar.net>
8387bf1
Mime-Version: 1.0
8387bf1
Content-Type: text/plain; charset=ISO-8859-1
8387bf1
Content-Transfer-Encoding: 8bit
8387bf1
------------
8387bf1
8387bf1
Patch 7.1.155
8387bf1
Problem:    Crash when 'undolevels' is 0 and repeating "udd". (James Vega)
8387bf1
Solution:   When there is only one branch use u_freeheader() to delete it.
8387bf1
Files:	    src/undo.c
8387bf1
8387bf1
8387bf1
*** ../vim-7.1.154/src/undo.c	Mon Oct  1 22:53:27 2007
8387bf1
--- src/undo.c	Sat Nov 10 13:45:28 2007
8387bf1
***************
8387bf1
*** 1677,1682 ****
8387bf1
--- 1677,1690 ----
8387bf1
      u_header_T	    **uhpp;	/* if not NULL reset when freeing this header */
8387bf1
  {
8387bf1
      u_header_T	    *tofree, *next;
8387bf1
+ 
8387bf1
+     /* If this is the top branch we may need to use u_freeheader() to update
8387bf1
+      * all the pointers. */
8387bf1
+     if (uhp == buf->b_u_oldhead)
8387bf1
+     {
8387bf1
+ 	u_freeheader(buf, uhp, uhpp);
8387bf1
+ 	return;
8387bf1
+     }
8387bf1
  
8387bf1
      if (uhp->uh_alt_prev != NULL)
8387bf1
  	uhp->uh_alt_prev->uh_alt_next = NULL;
8387bf1
*** ../vim-7.1.154/src/version.c	Thu Nov  8 21:23:34 2007
8387bf1
--- src/version.c	Sat Nov 10 22:49:40 2007
8387bf1
***************
8387bf1
*** 668,669 ****
8387bf1
--- 668,671 ----
8387bf1
  {   /* Add new patch number below this line */
8387bf1
+ /**/
8387bf1
+     155,
8387bf1
  /**/
8387bf1
8387bf1
-- 
8387bf1
I AM THANKFUL...
8387bf1
...for the piles of laundry and ironing because it means I
8387bf1
have plenty of clothes to wear.
8387bf1
8387bf1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
8387bf1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
8387bf1
\\\        download, build and distribute -- http://www.A-A-P.org        ///
8387bf1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///