diff options
author | KunMing Xie <qqzz014@gmail.com> | 2018-05-30 15:11:52 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-05-30 09:11:52 +0200 |
commit | 77a2eaf08bdc29f5ae6f4dc263b2a97b6cb749e8 (patch) | |
tree | edb9d5218655b1f030b6c19ea4b1e56efd6b791e /src/nvim/fold.c | |
parent | f711b635133fea2a137b97caa199f68d3142ed4f (diff) | |
download | rneovim-77a2eaf08bdc29f5ae6f4dc263b2a97b6cb749e8.tar.gz rneovim-77a2eaf08bdc29f5ae6f4dc263b2a97b6cb749e8.tar.bz2 rneovim-77a2eaf08bdc29f5ae6f4dc263b2a97b6cb749e8.zip |
vim-patch:8.0.0515: ml_get errors in silent Ex mode (#8452)
Problem: ml_get errors in silent Ex mode. (Dominique Pelle)
Solution: Clear valid flags when setting the cursor. Set the topline when
not in full screen mode.
https://github.com/vim/vim/commit/d5d37537d1fa46fd468bd378af2006dd09840f38
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r-- | src/nvim/fold.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 7a95f4ab0c..316fbef47c 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -2443,27 +2443,27 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level, flp->lnum - 1 - fp->fd_top); if (lvl < level) { - /* End of fold found, update the length when it got shorter. */ + // 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 - 1 > bot) { - /* fold continued below bot */ + // fold continued below bot if (getlevel == foldlevelMarker || getlevel == foldlevelExpr || getlevel == foldlevelSyntax) { - /* marker method: truncate the fold and make sure the - * previously included lines are processed again */ + // marker method: truncate the fold and make sure the + // previously included lines are processed again bot = fp->fd_top + fp->fd_len - 1; fp->fd_len = flp->lnum - fp->fd_top; } else { - /* indent or expr method: split fold to create a new one - * below bot */ + // indent or expr method: split fold to create a new one + // below bot i = (int)(fp - (fold_T *)gap->ga_data); foldSplit(gap, i, flp->lnum, bot); fp = (fold_T *)gap->ga_data + i; } } else fp->fd_len = flp->lnum - fp->fd_top; - fold_changed = TRUE; + fold_changed = true; } } |