ZyX wrote:

> Consider the following script:
> 
>     function! ERB()
>         execute "try"
>            \."\n   echo tr()"
>            \."\n catch"
>            \."\n   echomsg v:exception"
>            \."\n   return 1"
>            \."\n endtry"
>            \."\n return 0"
>         return r
>     endfunction
>     echomsg ERB()
>     execute "try"
>        \."\n   call tr()"
>        \."\n catch"
>        \."\n   echomsg v:exception"
>        \."\n endtry"
> 
> (also attached). If you source it with `vim -u NONE -N -S 
> execute-return-bug.vim` you will see
> 
>     Vim(echo):E119: Not enough arguments for function: tr
>     0
>     Error detected while processing /home/zyx/tmp/vim/execute-return-bug.vim:
>     line   16:
>     E119: Not enough arguments for function: tr
> 
> while expected to see
> 
>     Vim(echo):E119: Not enough arguments for function: tr
>     1
>     Vim(call):E119: Not enough arguments for function: tr
> 
> (note the second line: it contains 1; and the third: it shows caught 
> exception). If I unwrap the script (replace `:execute` calls with the string 
> it executes) then everything works as expected.

I'll add it in the todo list.

-- 
hundred-and-one symptoms of being an internet addict:
214. Your MCI "Circle of Friends" are all Hayes-compatible.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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.

Raspunde prin e-mail lui