patch 8.2.4393: possible number overflow with nested folds
Problem: Possible number overflow with nested folds.
Solution: Avoid a negative line number.
diff --git a/src/fold.c b/src/fold.c
index 3f8de1c..33c2699 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -1604,7 +1604,7 @@
if (amount == MAXLNUM)
{
foldMarkAdjustRecurse(&fp->fd_nested,
- line1 - fp->fd_top,
+ 0,
line2 - fp->fd_top,
amount,
amount_after + (fp->fd_top - top));
@@ -1614,7 +1614,7 @@
else
{
foldMarkAdjustRecurse(&fp->fd_nested,
- line1 - fp->fd_top,
+ 0,
line2 - fp->fd_top,
amount,
amount_after - amount);