Mercurial > vim
comparison src/ex_docmd.c @ 10488:89200fa1d174 v8.0.0137
commit https://github.com/vim/vim/commit/777b30f827bcbe10a40640b1bf0361cb93a16be1
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 2 15:26:27 2017 +0100
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'.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 02 Jan 2017 15:30:04 +0100 |
parents | c7de1536780a |
children | 8f2191b56d52 |
comparison
equal
deleted
inserted
replaced
10487:36f5306701e5 | 10488:89200fa1d174 |
---|---|
785 msg_list = &private_msg_list; | 785 msg_list = &private_msg_list; |
786 private_msg_list = NULL; | 786 private_msg_list = NULL; |
787 #endif | 787 #endif |
788 | 788 |
789 /* It's possible to create an endless loop with ":execute", catch that | 789 /* It's possible to create an endless loop with ":execute", catch that |
790 * here. The value of 200 allows nested function calls, ":source", etc. */ | 790 * here. The value of 200 allows nested function calls, ":source", etc. |
791 if (call_depth == 200) | 791 * Allow 200 or 'maxfuncdepth', whatever is larger. */ |
792 if (call_depth >= 200 && call_depth >= p_mfd) | |
792 { | 793 { |
793 EMSG(_("E169: Command too recursive")); | 794 EMSG(_("E169: Command too recursive")); |
794 #ifdef FEAT_EVAL | 795 #ifdef FEAT_EVAL |
795 /* When converting to an exception, we do not include the command name | 796 /* When converting to an exception, we do not include the command name |
796 * since this is not an error of the specific command. */ | 797 * since this is not an error of the specific command. */ |