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