Karsten Hopp 729a84
To: vim-dev@vim.org
Karsten Hopp 729a84
Subject: Patch 7.2.421
Karsten Hopp 729a84
Fcc: outbox
Karsten Hopp 729a84
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 729a84
Mime-Version: 1.0
Karsten Hopp 729a84
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 729a84
Content-Transfer-Encoding: 8bit
Karsten Hopp 729a84
------------
Karsten Hopp 729a84
Karsten Hopp 729a84
Patch 7.2.421
Karsten Hopp 729a84
Problem:    Folds are sometimes not updated properly and there is no way to
Karsten Hopp 729a84
	    force an update.
Karsten Hopp 729a84
Solution:   Make "zx" and "zX" recompute folds (suggested by Christian
Karsten Hopp 729a84
	    Brabandt)
Karsten Hopp 729a84
Files:	    src/normal.c
Karsten Hopp 729a84
Karsten Hopp 729a84
Karsten Hopp 729a84
*** ../vim-7.2.420/src/normal.c	2010-05-07 15:51:59.000000000 +0200
Karsten Hopp 729a84
--- src/normal.c	2010-05-13 16:43:05.000000000 +0200
Karsten Hopp 729a84
***************
Karsten Hopp 729a84
*** 4936,4948 ****
Karsten Hopp 729a84
  
Karsten Hopp 729a84
  		/* "zx": re-apply 'foldlevel' and open folds at the cursor */
Karsten Hopp 729a84
      case 'x':	curwin->w_p_fen = TRUE;
Karsten Hopp 729a84
! 		newFoldLevel();		/* update right now */
Karsten Hopp 729a84
  		foldOpenCursor();
Karsten Hopp 729a84
  		break;
Karsten Hopp 729a84
  
Karsten Hopp 729a84
  		/* "zX": undo manual opens/closes, re-apply 'foldlevel' */
Karsten Hopp 729a84
      case 'X':	curwin->w_p_fen = TRUE;
Karsten Hopp 729a84
! 		old_fdl = -1;		/* force an update */
Karsten Hopp 729a84
  		break;
Karsten Hopp 729a84
  
Karsten Hopp 729a84
  		/* "zm": fold more */
Karsten Hopp 729a84
--- 4936,4950 ----
Karsten Hopp 729a84
  
Karsten Hopp 729a84
  		/* "zx": re-apply 'foldlevel' and open folds at the cursor */
Karsten Hopp 729a84
      case 'x':	curwin->w_p_fen = TRUE;
Karsten Hopp 729a84
! 		curwin->w_foldinvalid = TRUE;	/* recompute folds */
Karsten Hopp 729a84
! 		newFoldLevel();			/* update right now */
Karsten Hopp 729a84
  		foldOpenCursor();
Karsten Hopp 729a84
  		break;
Karsten Hopp 729a84
  
Karsten Hopp 729a84
  		/* "zX": undo manual opens/closes, re-apply 'foldlevel' */
Karsten Hopp 729a84
      case 'X':	curwin->w_p_fen = TRUE;
Karsten Hopp 729a84
! 		curwin->w_foldinvalid = TRUE;	/* recompute folds */
Karsten Hopp 729a84
! 		old_fdl = -1;			/* force an update */
Karsten Hopp 729a84
  		break;
Karsten Hopp 729a84
  
Karsten Hopp 729a84
  		/* "zm": fold more */
Karsten Hopp 729a84
*** ../vim-7.2.420/src/version.c	2010-05-13 16:46:16.000000000 +0200
Karsten Hopp 729a84
--- src/version.c	2010-05-13 17:33:34.000000000 +0200
Karsten Hopp 729a84
***************
Karsten Hopp 729a84
*** 683,684 ****
Karsten Hopp 729a84
--- 683,686 ----
Karsten Hopp 729a84
  {   /* Add new patch number below this line */
Karsten Hopp 729a84
+ /**/
Karsten Hopp 729a84
+     421,
Karsten Hopp 729a84
  /**/
Karsten Hopp 729a84
Karsten Hopp 729a84
-- 
Karsten Hopp 729a84
My sister Cecilia opened a computer store in Hawaii.
Karsten Hopp 729a84
She sells C shells by the seashore.
Karsten Hopp 729a84
Karsten Hopp 729a84
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 729a84
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 729a84
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 729a84
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///