# HG changeset patch # User vimboss # Date 1253279829 0 # Node ID 7d2641e6af75b3cfb4dc29e7c88812dee6c003ae # Parent 9edb5759494281d90ae0f312b2ac32c30f51ca50 updated for version 7.2-261 diff --git a/src/fold.c b/src/fold.c --- a/src/fold.c +++ b/src/fold.c @@ -1607,11 +1607,11 @@ foldMarkAdjustRecurse(gap, line1, line2, } else { - /* 2, 3, or 5: need to correct nested folds too */ - foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top, - line2 - fp->fd_top, amount, amount_after); if (fp->fd_top < top) { + /* 2 or 3: need to correct nested folds too */ + foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top, + line2 - fp->fd_top, amount, amount_after); if (last <= line2) { /* 2. fold contains line1, line2 is below fold */ @@ -1628,7 +1628,11 @@ foldMarkAdjustRecurse(gap, line1, line2, } else { - /* 5. fold is below line1 and contains line2 */ + /* 5. fold is below line1 and contains line2; need to + * correct nested folds too */ + foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top, + line2 - fp->fd_top, amount, + amount_after + (fp->fd_top - top)); if (amount == MAXLNUM) { fp->fd_len -= line2 - fp->fd_top + 1; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -677,6 +677,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 261, +/**/ 260, /**/ 259,