diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index 425da6c055..fbdf4b9630 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -3961,7 +3961,7 @@ addstate ( // This function is called recursively. When the depth is too much we run // out of stack and crash, limit recursiveness here. - if (++depth >= 10000 || subs == NULL) { + if (++depth >= 5000 || subs == NULL) { depth--; return NULL; }