0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

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

@@ -40,3 +40,24 @@ func Test_nested_argument()
delfunc g:X
unlet g:Y
endfunc
func Recurse(count)
if a:count > 0
call Recurse(a:count - 1)
endif
endfunc
func Test_max_nesting()
let call_depth_here = 2
let ex_depth_here = 5
set mfd&
call Recurse(99 - call_depth_here)
call assert_fails('call Recurse(' . (100 - call_depth_here) . ')', 'E132:')
set mfd=210
call Recurse(209 - ex_depth_here)
call assert_fails('call Recurse(' . (210 - ex_depth_here) . ')', 'E169:')
set mfd&
endfunc