changeset 2139:35effbd07a25 v7.2.421

updated for version 7.2.421 Problem: Folds are sometimes not updated properly and there is no way to force an update. Solution: Make "zx" and "zX" recompute folds (suggested by Christian Brabandt)
author Bram Moolenaar <bram@zimbu.org>
date Thu, 13 May 2010 17:35:59 +0200
parents 78b9d5dce950
children 12aba62fa7c6
files src/normal.c src/version.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -4936,13 +4936,15 @@ dozet:
 
 		/* "zx": re-apply 'foldlevel' and open folds at the cursor */
     case 'x':	curwin->w_p_fen = TRUE;
-		newFoldLevel();		/* update right now */
+		curwin->w_foldinvalid = TRUE;	/* recompute folds */
+		newFoldLevel();			/* update right now */
 		foldOpenCursor();
 		break;
 
 		/* "zX": undo manual opens/closes, re-apply 'foldlevel' */
     case 'X':	curwin->w_p_fen = TRUE;
-		old_fdl = -1;		/* force an update */
+		curwin->w_foldinvalid = TRUE;	/* recompute folds */
+		old_fdl = -1;			/* force an update */
 		break;
 
 		/* "zm": fold more */
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    421,
+/**/
     420,
 /**/
     419,