# HG changeset patch # User Bram Moolenaar # Date 1644703203 -3600 # Node ID 567f4f964ccc93f112aff2772d147e81ea1cd97b # Parent b4daa7e68abd48f5740fd635a9d79f88bef8fe04 patch 8.2.4364: MS-Windows: still running out of memory for a very long line Commit: https://github.com/vim/vim/commit/45491660787043ea412719544881db691338d730 Author: Bram Moolenaar Date: Sat Feb 12 21:59:51 2022 +0000 patch 8.2.4364: MS-Windows: still running out of memory for a very long line Problem: MS-Windows: still running out of memory for a very long line. Solution: Check for negative length. diff --git a/src/indent.c b/src/indent.c --- a/src/indent.c +++ b/src/indent.c @@ -1726,7 +1726,7 @@ ex_retab(exarg_T *eap) len = num_spaces + num_tabs; old_len = (long)STRLEN(ptr); new_len = old_len - col + start_col + len + 1; - if (new_len >= MAXCOL) + if (new_len <= 0 || new_len >= MAXCOL) { emsg(_(e_resulting_text_too_long)); break; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4364, +/**/ 4363, /**/ 4362,