452c73c
To: vim-dev@vim.org
452c73c
Subject: patch 7.1.085
452c73c
Fcc: outbox
452c73c
From: Bram Moolenaar <Bram@moolenaar.net>
452c73c
Mime-Version: 1.0
452c73c
Content-Type: text/plain; charset=ISO-8859-1
452c73c
Content-Transfer-Encoding: 8bit
452c73c
------------
452c73c
452c73c
Patch 7.1.085
452c73c
Problem:    ":e fold.c" then ":sp fold.c" results in folds of original window
452c73c
	    to disappear. (Akita Noek)
452c73c
Solution:   Invoke foldUpdateAll() for all windows of the changed buffer.
452c73c
	    (Martin Toft)
452c73c
Files:	    src/ex_cmds.c
452c73c
452c73c
452c73c
*** ../vim-7.1.084/src/ex_cmds.c	Tue Aug 21 15:05:54 2007
452c73c
--- src/ex_cmds.c	Tue Aug 21 15:02:43 2007
452c73c
***************
452c73c
*** 2974,2980 ****
452c73c
   * 'fnum' is the number of the file, if zero use ffname/sfname.
452c73c
   *
452c73c
   * Return 1 for "normal" error, 2 for "not written" error, 0 for success
452c73c
!  * -1 for succesfully opening another file.
452c73c
   * 'lnum' is the line number for the cursor in the new file (if non-zero).
452c73c
   */
452c73c
      int
452c73c
--- 2974,2980 ----
452c73c
   * 'fnum' is the number of the file, if zero use ffname/sfname.
452c73c
   *
452c73c
   * Return 1 for "normal" error, 2 for "not written" error, 0 for success
452c73c
!  * -1 for successfully opening another file.
452c73c
   * 'lnum' is the line number for the cursor in the new file (if non-zero).
452c73c
   */
452c73c
      int
452c73c
***************
452c73c
*** 3584,3592 ****
452c73c
  	curwin_init();
452c73c
  
452c73c
  #ifdef FEAT_FOLDING
452c73c
! 	/* It's like all lines in the buffer changed.  Need to update
452c73c
! 	 * automatic folding. */
452c73c
  	foldUpdateAll(curwin);
452c73c
  #endif
452c73c
  
452c73c
  	/* Change directories when the 'acd' option is set. */
452c73c
--- 3584,3603 ----
452c73c
  	curwin_init();
452c73c
  
452c73c
  #ifdef FEAT_FOLDING
452c73c
! 	/* It's possible that all lines in the buffer changed.  Need to update
452c73c
! 	 * automatic folding for all windows where it's used. */
452c73c
! # ifdef FEAT_WINDOWS
452c73c
! 	{
452c73c
! 	    win_T	    *win;
452c73c
! 	    tabpage_T	    *tp;
452c73c
! 
452c73c
! 	    FOR_ALL_TAB_WINDOWS(tp, win)
452c73c
! 		if (win->w_buffer == curbuf)
452c73c
! 		    foldUpdateAll(win);
452c73c
! 	}
452c73c
! # else
452c73c
  	foldUpdateAll(curwin);
452c73c
+ # endif
452c73c
  #endif
452c73c
  
452c73c
  	/* Change directories when the 'acd' option is set. */
452c73c
*** ../vim-7.1.084/src/version.c	Tue Aug 21 15:05:54 2007
452c73c
--- src/version.c	Tue Aug 21 15:26:43 2007
452c73c
***************
452c73c
*** 668,669 ****
452c73c
--- 668,671 ----
452c73c
  {   /* Add new patch number below this line */
452c73c
+ /**/
452c73c
+     85,
452c73c
  /**/
452c73c
452c73c
-- 
452c73c
Your fault: core dumped
452c73c
452c73c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
452c73c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
452c73c
\\\        download, build and distribute -- http://www.A-A-P.org        ///
452c73c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///