forked from aniani/vim
updated for version 7.2.356
Problem: When 'foldmethod' is changed not all folds are closed as expected. Solution: In foldUpdate() correct the start position and reset fd_flags when w_foldinvalid is set. (Lech Lorens)
This commit is contained in:
@@ -849,11 +849,17 @@ foldUpdate(wp, top, bot)
|
|||||||
fold_T *fp;
|
fold_T *fp;
|
||||||
|
|
||||||
/* Mark all folds from top to bot as maybe-small. */
|
/* Mark all folds from top to bot as maybe-small. */
|
||||||
(void)foldFind(&curwin->w_folds, curwin->w_cursor.lnum, &fp);
|
(void)foldFind(&curwin->w_folds, top, &fp);
|
||||||
while (fp < (fold_T *)curwin->w_folds.ga_data + curwin->w_folds.ga_len
|
while (fp < (fold_T *)curwin->w_folds.ga_data + curwin->w_folds.ga_len
|
||||||
&& fp->fd_top < bot)
|
&& fp->fd_top < bot)
|
||||||
{
|
{
|
||||||
fp->fd_small = MAYBE;
|
fp->fd_small = MAYBE;
|
||||||
|
|
||||||
|
/* Not sure if this is the right place to reset fd_flags (suggested by
|
||||||
|
* Lech Lorens). */
|
||||||
|
if (wp->w_foldinvalid)
|
||||||
|
fp->fd_flags = FD_LEVEL;
|
||||||
|
|
||||||
++fp;
|
++fp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -681,6 +681,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
356,
|
||||||
/**/
|
/**/
|
||||||
355,
|
355,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user