Lech Lorens wrote:

> The attached patch fixes the problems with patch 7.2.356 (by actually
> reverting the patch) which caused the folds to be closed in too many
> situations.
> Changes:
> - in case of 'foldmethod' change the folds are closed only if 'fdm' is
>   changed to 'diff',
> - folds are closed when one of the following commands is used:
>   :diffsplit, :diffthis, :diffpatch.
> 
> To decrease the likelihood of undesired side effects the code handling
> the normal zM command has been reused.
> 
> My apologies for the problems introduced by 7.2.356.

I think some of this doesn't need to be reverted.  E.g.:

>      fold_T   *fp;
>  
>      /* Mark all folds from top to bot as maybe-small. */
> -    (void)foldFind(&curwin->w_folds, top, &fp);
> +    (void)foldFind(&curwin->w_folds, curwin->w_cursor.lnum, &fp);
>      while (fp < (fold_T *)curwin->w_folds.ga_data + curwin->w_folds.ga_len
>           && fp->fd_top < bot)
>      {

I think "top" is the right value.  Didn't run some tests with/without
this change though.

-- 
Place mark here ->[ ]<- if you want a dirty monitor.

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui