diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-04-25 04:12:04 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-04-25 04:12:04 -0400 |
commit | 6f980346864251d2ed86d85c63fd6ec375e21edc (patch) | |
tree | e640731f2b18974afab3f83c5241f83adb1fd5a1 /src/nvim/fold.c | |
parent | 588bc1d9586bc65b63519bc9d292fa4ab59b2dba (diff) | |
parent | 23e8d6d94b74c7b6d4e4c766e34500ff220abe96 (diff) | |
download | rneovim-6f980346864251d2ed86d85c63fd6ec375e21edc.tar.gz rneovim-6f980346864251d2ed86d85c63fd6ec375e21edc.tar.bz2 rneovim-6f980346864251d2ed86d85c63fd6ec375e21edc.zip |
Merge pull request #4632 from KillTheMule/vim-7.4.822
vim-patch:7.4.822
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r-- | src/nvim/fold.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 7f46a37315..ac3cf959c8 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -2110,10 +2110,11 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level, */ if (getlevel == foldlevelMarker && flp->start <= flp->lvl - level && flp->lvl > 0) { - foldFind(gap, startlnum - 1, &fp); + (void)foldFind(gap, startlnum - 1, &fp); if (fp >= ((fold_T *)gap->ga_data) + gap->ga_len - || fp->fd_top >= startlnum) + || fp->fd_top >= startlnum) { fp = NULL; + } } /* @@ -2167,13 +2168,15 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level, } } if (lvl < level + i) { - foldFind(&fp->fd_nested, flp->lnum - fp->fd_top, &fp2); - if (fp2 != NULL) + (void)foldFind(&fp->fd_nested, flp->lnum - fp->fd_top, &fp2); + if (fp2 != NULL) { bot = fp2->fd_top + fp2->fd_len - 1 + fp->fd_top; - } else if (fp->fd_top + fp->fd_len <= flp->lnum && lvl >= level) - finish = TRUE; - else + } + } else if (fp->fd_top + fp->fd_len <= flp->lnum && lvl >= level) { + finish = true; + } else { break; + } } /* At the start of the first nested fold and at the end of the current |