mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.1972: crash when recreating nested fold
Problem: Crash when recreating nested fold. Solution: Check for empty growarray. (closes #7278)
This commit is contained in:
@@ -640,7 +640,10 @@ foldCreate(linenr_T start, linenr_T end)
|
||||
break;
|
||||
}
|
||||
}
|
||||
i = (int)(fp - (fold_T *)gap->ga_data);
|
||||
if (gap->ga_len == 0)
|
||||
i = 0;
|
||||
else
|
||||
i = (int)(fp - (fold_T *)gap->ga_data);
|
||||
}
|
||||
|
||||
if (ga_grow(gap, 1) == OK)
|
||||
|
Reference in New Issue
Block a user