mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.0.0583: fold test hangs on MS-Windows
Problem: Fold test hangs on MS-Windows. Solution: Avoid overflow in compare.
This commit is contained in:
@@ -2928,7 +2928,7 @@ foldRemove(garray_T *gap, linenr_T top, linenr_T bot)
|
|||||||
{
|
{
|
||||||
/* 2: or 3: need to delete nested folds */
|
/* 2: or 3: need to delete nested folds */
|
||||||
foldRemove(&fp->fd_nested, top - fp->fd_top, bot - fp->fd_top);
|
foldRemove(&fp->fd_nested, top - fp->fd_top, bot - fp->fd_top);
|
||||||
if (fp->fd_top + fp->fd_len > bot + 1)
|
if (fp->fd_top + fp->fd_len - 1 > bot)
|
||||||
{
|
{
|
||||||
/* 3: need to split it. */
|
/* 3: need to split it. */
|
||||||
foldSplit(gap, (int)(fp - (fold_T *)gap->ga_data), top, bot);
|
foldSplit(gap, (int)(fp - (fold_T *)gap->ga_data), top, bot);
|
||||||
@@ -2970,10 +2970,12 @@ foldRemove(garray_T *gap, linenr_T top, linenr_T bot)
|
|||||||
|
|
||||||
/* foldReverseOrder() {{{2 */
|
/* foldReverseOrder() {{{2 */
|
||||||
static void
|
static void
|
||||||
foldReverseOrder(garray_T *gap, linenr_T start, linenr_T end)
|
foldReverseOrder(garray_T *gap, linenr_T start_arg, linenr_T end_arg)
|
||||||
{
|
{
|
||||||
fold_T *left, *right;
|
fold_T *left, *right;
|
||||||
fold_T tmp;
|
fold_T tmp;
|
||||||
|
linenr_T start = start_arg;
|
||||||
|
linenr_T end = end_arg;
|
||||||
|
|
||||||
for (; start < end; start++, end--)
|
for (; start < end; start++, end--)
|
||||||
{
|
{
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
583,
|
||||||
/**/
|
/**/
|
||||||
582,
|
582,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user