diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 5 | ||||
-rw-r--r-- | src/nvim/options.lua | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 74b1dbfb72..b5b40061b5 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -6064,6 +6064,11 @@ bool callback_call(Callback *const callback, const int argcount_in, typval_T *co typval_T *const rettv) FUNC_ATTR_NONNULL_ALL { + if (callback_depth > p_mfd) { + emsg(_(e_command_too_recursive)); + return false; + } + partial_T *partial; char *name; Array args = ARRAY_DICT_INIT; diff --git a/src/nvim/options.lua b/src/nvim/options.lua index f11fea85ca..ec8450ba17 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -5154,6 +5154,7 @@ return { Increasing this limit above 200 also changes the maximum for Ex command recursion, see |E169|. See also |:function|. + Also used for maximum depth of callback functions. ]=], full_name = 'maxfuncdepth', scope = { 'global' }, |