verbose command throw exception with self-referencing.

42 views
Skip to first unread message

mattn

unread,
Apr 18, 2012, 5:31:02 AM4/18/12
to vim...@googlegroups.com
Hi.

When :source following code:

----------------------------
function! s:e724()
let a = {}
let a.a = a
return a
endfunction

try
echo s:e724()
catch
echo 'error!'
endtry
echo '---------'
try
12verbose echo s:e724()
catch
echo 'error!'
endtry
----------------------------
https://gist.github.com/2412167

`echo s:e724()` show a result of s:e724() as `{'a': {...}}`. It's abbreviate with ... for referencing recursibly.
But `12verbose echo s:e724()` make be occur error. And throw exception. Them, the code above show error!

It seems that `12verbose` is trying to show detail of the variables, and do self-referencing for the variable. So exception is thrown.
Below is a patch to fix this problem. I checked the part using tv2string().

https://gist.github.com/2412161

Please check and include.

mattn

unread,
Dec 26, 2012, 10:42:08 PM12/26/12
to vim...@googlegroups.com
ping
Reply all
Reply to author
Forward
0 new messages