diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-09-18 13:17:09 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-09-18 13:17:09 +0000 |
commit | 194b94c5a8c64e8e4d1ae180a59b1ed93010c196 (patch) | |
tree | fc3bbabe2e6ca4b505be7b7295c20aed375ff671 /src/fold.c | |
parent | 2db24dc29b12eabd4aa4a1d3258298cf2d689a86 (diff) | |
download | vim-git-194b94c5a8c64e8e4d1ae180a59b1ed93010c196.tar.gz |
updated for version 7.2-261v7.2.261
Diffstat (limited to 'src/fold.c')
-rw-r--r-- | src/fold.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/fold.c b/src/fold.c index 6567906be..a127bf67c 100644 --- a/src/fold.c +++ b/src/fold.c @@ -1607,11 +1607,11 @@ foldMarkAdjustRecurse(gap, line1, line2, amount, amount_after) } 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, amount, amount_after) } 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; |