mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 00:46:30 +00:00
vim-patch:9.0.2183: Maximum callback depth is not configurable (#26703)
Problem: Maximum callback depth is not configurable.
Solution: Revert patch 9.0.2103. Set 'maxfuncdepth' in test.
fixes: vim/vim#13732
closes: vim/vim#13736
fe583b1e59
This commit is contained in:
@@ -89,8 +89,6 @@
|
||||
|
||||
#define DICT_MAXNEST 100 // maximum nesting of lists and dicts
|
||||
|
||||
#define MAX_CALLBACK_DEPTH 20
|
||||
|
||||
static const char *e_missbrac = N_("E111: Missing ']'");
|
||||
static const char *e_list_end = N_("E697: Missing end of List ']': %s");
|
||||
static const char e_cannot_slice_dictionary[]
|
||||
@@ -6061,7 +6059,7 @@ bool callback_call(Callback *const callback, const int argcount_in, typval_T *co
|
||||
typval_T *const rettv)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
if (callback_depth > MAX_CALLBACK_DEPTH) {
|
||||
if (callback_depth > p_mfd) {
|
||||
emsg(_(e_command_too_recursive));
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user