aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fold.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r--src/nvim/fold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c
index ad9cd4d562..7a95f4ab0c 100644
--- a/src/nvim/fold.c
+++ b/src/nvim/fold.c
@@ -2445,7 +2445,7 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
if (lvl < level) {
/* End of fold found, update the length when it got shorter. */
if (fp->fd_len != flp->lnum - fp->fd_top) {
- if (fp->fd_top + fp->fd_len > bot + 1) {
+ if (fp->fd_top + fp->fd_len - 1 > bot) {
/* fold continued below bot */
if (getlevel == foldlevelMarker
|| getlevel == foldlevelExpr