On 19-02-2010 Bram Moolenaar <[email protected]> wrote:
>
> 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.
>
> 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.
OK.
I updated test45.in and test45.ok so that they discover the problem with
syntax-based folds getting closed when ^L is hit. The updated test 45
- succeeds for Vim 7.2.355,
- fails for 7.2.356 and any more recent Vim version,
- succeeds again if the patch from my last email is applied.
--
Cheers,
Lech
--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
diff --git a/src/testdir/test45.in b/src/testdir/test45.in
index 1dfad54..e5af507 100644
--- a/src/testdir/test45.in
+++ b/src/testdir/test45.in
@@ -36,6 +36,8 @@ Gzk:call append("$", "folding " . getline("."))
k:call append("$", getline("."))
jAcommentstart Acommentend:set fdl=1
3j:call append("$", getline("."))
+:set fdl=0
+zOj:call append("$", getline("."))
:" test expression folding
:fun Flvl()
let l = getline(v:lnum)
diff --git a/src/testdir/test45.ok b/src/testdir/test45.ok
index 713cf88..f04996e 100644
--- a/src/testdir/test45.ok
+++ b/src/testdir/test45.ok
@@ -11,6 +11,7 @@ indent 2
folding 9 ii
3 cc
7 gg
+8 hh
expr 2
1
2