Patch 8.2.4393
Problem: Possible number overflow with nested folds.
Solution: Avoid a negative line number.
Files: src/fold.c
*** ../vim-8.2.4392/src/fold.c 2022-01-28 15:28:00.208927722 +0000
--- src/fold.c 2022-02-15 19:01:21.348589264 +0000
***************
*** 1604,1610 ****
if (amount == MAXLNUM)
{
foldMarkAdjustRecurse(&fp->fd_nested,
! line1 - fp->fd_top,
line2 - fp->fd_top,
amount,
amount_after + (fp->fd_top - top));
--- 1604,1610 ----
if (amount == MAXLNUM)
{
foldMarkAdjustRecurse(&fp->fd_nested,
! 0,
line2 - fp->fd_top,
amount,
amount_after + (fp->fd_top - top));
***************
*** 1614,1620 ****
else
{
foldMarkAdjustRecurse(&fp->fd_nested,
! line1 - fp->fd_top,
line2 - fp->fd_top,
amount,
amount_after - amount);
--- 1614,1620 ----
else
{
foldMarkAdjustRecurse(&fp->fd_nested,
! 0,
line2 - fp->fd_top,
amount,
amount_after - amount);
*** ../vim-8.2.4392/src/version.c 2022-02-15 17:17:13.789550341 +0000
--- src/version.c 2022-02-15 19:15:08.102837390 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4393,
/**/
--
hundred-and-one symptoms of being an internet addict:
46. Your wife makes a new rule: "The computer cannot come to bed."
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///