1
0
forked from aniani/vim

patch 8.0.0137

Problem:    When 'maxfuncdepth' is set above 200 the nesting is limited to
            200. (Brett Stahlman)
Solution:   Allow for Ex command recursion depending on 'maxfuncdepth'.
This commit is contained in:
Bram Moolenaar
2017-01-02 15:26:27 +01:00
parent 54b2bfa399
commit 777b30f827
3 changed files with 26 additions and 2 deletions

View File

@@ -787,8 +787,9 @@ do_cmdline(
#endif
/* It's possible to create an endless loop with ":execute", catch that
* here. The value of 200 allows nested function calls, ":source", etc. */
if (call_depth == 200)
* here. The value of 200 allows nested function calls, ":source", etc.
* Allow 200 or 'maxfuncdepth', whatever is larger. */
if (call_depth >= 200 && call_depth >= p_mfd)
{
EMSG(_("E169: Command too recursive"));
#ifdef FEAT_EVAL