mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
vim-patch:8.0.0503: endless loop in updating folds with 32 bit ints (#8433)
Problem: Endless loop in updating folds with 32 bit ints. Solution: Subtract from LHS instead of add to the RHS. (Matthew Malcomson) vim/vim@9d20ce6
This commit is contained in:

committed by
Justin M. Keyes

parent
418abfc9d0
commit
c67139f8aa
@@ -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
|
||||
|
Reference in New Issue
Block a user