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