Loading ...
Sorry, an error occurred while loading the content.

verbose command throw exception with self-referencing.

Expand Messages
  • mattn
    Hi. ... function! s:e724() let a = {} let a.a = a return a endfunction try echo s:e724() catch echo error! endtry echo --------- try 12verbose echo
    Message 1 of 2 , Apr 18, 2012
    • 0 Attachment
      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.

      --
      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
    • mattn
      ping -- 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
      Message 2 of 2 , Dec 26, 2012
      • 0 Attachment
        ping

        --
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.