patch 9.0.2030: no max callback recursion limit
Problem: no max callback recursion limit
Solution: bail out, if max call recursion for callback functions
has been reached.
This checks the 'maxfuncdepth' setting and throws E169 when a callback
function recursively calls itself.
closes: #13337
closes: #13339
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 60dc5d9..a256ddf 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -4205,5 +4205,11 @@
call StopVimInTerminal(buf)
endfunc
+func Test_popup_close_callback_recursive()
+ " this invokes the callback recursively
+ let winid = popup_create('something', #{callback: 'popup_close'})
+ redraw
+ call assert_fails('call popup_close(winid)', 'E169')
+endfunc
" vim: shiftwidth=2 sts=2