diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-02-12 21:33:09 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2022-02-12 21:38:00 +0000 |
commit | 72e3d2c9baabfbcf3f6505097754472c0e88b317 (patch) | |
tree | 38971759ce0b97cc2ba7260ab72e46c0f37e0125 | |
parent | 700af0ab1d8e85f1f191f4b97f3dda456b5a9551 (diff) | |
download | rneovim-72e3d2c9baabfbcf3f6505097754472c0e88b317.tar.gz rneovim-72e3d2c9baabfbcf3f6505097754472c0e88b317.tar.bz2 rneovim-72e3d2c9baabfbcf3f6505097754472c0e88b317.zip |
vim-patch:8.2.4363: MS-Windows: running out of memory for a very long line
Problem: MS-Windows: running out of memory for a very long line.
Solution: Use a 32 bit value for MAXCOL also when ints are 64 bits.
https://github.com/vim/vim/commit/8e38555ece7d3fe1edc6681ec70fe5586a524862
This still fails Vim's Windows CI, so let's see what happens...
-rw-r--r-- | src/nvim/pos.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/pos.h b/src/nvim/pos.h index d17e27906e..51991ed314 100644 --- a/src/nvim/pos.h +++ b/src/nvim/pos.h @@ -16,7 +16,9 @@ typedef int colnr_T; /// Maximal (invalid) line number enum { MAXLNUM = 0x7fffffff, }; /// Maximal column number -enum { MAXCOL = INT_MAX, }; +/// MAXCOL used to be INT_MAX, but with 64 bit ints that results in running +/// out of memory when trying to allocate a very long line. +enum { MAXCOL = 0x7fffffff, }; // Minimum line number enum { MINLNUM = 1, }; // minimum column number |