Consider the following script:
function Def()
try
let l=[]
call add(l, l)
return l
endtry
endfunction
function Abc()
call Def()
echomsg 'def'
endfunction
debuggreedy
call feedkeys("n\nn\n")
debug call Abc()
0debuggreedy
. When launched with
vim -u NONE -S bug.vim
this prints the following:
Entering Debug mode. Type "cont" to continue.
/home/zyx/a.a/Proj/c/zsh/bug.vim
line 14: call Abc()
>n
:return made pending
Exception thrown: Vim(return):E724: variable nested too deep for displaying
:return discarded
Exception discarded: Vim(return):E724: variable nested too deep for
displaying
Error detected while processing function Abc..Def:
line 4:
E724: variable nested too deep for displaying
E724: variable nested too deep for displaying
. Expected is the same output as without `call add(l, l)` line:
Entering Debug mode. Type "cont" to continue.
/home/zyx/a.a/Proj/c/zsh/bug.vim
line 13: call Abc()
:return [] made pending
:return [] resumed
def
(except for return values). Note that if you replace `debug ` with `set
verbose=15 | ` you will get nearly the same unexpected result:
ine 14: call Abc()
calling function Abc()
line 1: call Def()
calling function Abc..Def()
line 1: try
line 2: let l=[]
line 3: call add(l, l)
line 4: return l
:return made pending
Exception thrown: Vim(return):E724: variable nested too deep for displaying
:return discarded
line 5: endtry
Exception discarded: Vim(return):E724: variable nested too deep for
displaying
Error detected while processing function Abc..Def:
line 4:
E724: variable nested too deep for displaying
E724: variable nested too deep for displaying
function Abc..Def aborted
continuing in function Abc
function Abc aborted
continuing in /home/zyx/a.a/Proj/c/zsh/bug.vim
finished sourcing bug.vim
continuing in command line
meaning that no debugging capabilities of vim can be used reliably.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.