neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit e3acf913db7eb27d53ea8f91b70fb2c723796be9
parent 807c6bb909806b5abc3e46a9677bedfdddf2a7f0
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Thu, 27 Oct 2022 11:50:08 +0800

vim-patch:8.2.4207: recursion test fails with MSVC

Problem:    Recursion test fails with MSVC.
Solution:   Use a smaller limit for MSVC.

https://github.com/vim/vim/commit/50e05254450954f04183efc7bc871527a67868b8

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Diffstat:
Msrc/nvim/eval.c | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/nvim/eval.c b/src/nvim/eval.c @@ -2926,8 +2926,14 @@ static int eval7(char **arg, typval_T *rettv, int evaluate, int want_string) end_leader = *arg; // Limit recursion to 1000 levels. At least at 10000 we run out of stack - // and crash. - if (recurse == 1000) { + // and crash. With MSVC the stack is smaller. + if (recurse == +#ifdef _MSC_VER + 300 +#else + 1000 +#endif + ) { semsg(_(e_expression_too_recursive_str), *arg); return FAIL; }