Bram Moolenaar schrieb: > > Someone with the weird name dr-dr xp wrote: > >> ----- code ----- >> func! s:foo() >> throw 'exception' >> endfunc >> >> func! Foo() >> try >> silent s:foo() >> catch >> " nop. >> endtry >> endfunc >> ----- code ----- >> >> ":call Foo()" makes Vim stay 'silent mode' >> >> After this, :some_command can work fine, but nothing shown in >> command-line as typing. >> This bug occurs in this version: >> http://sourceforge.net/projects/cream/files/Vim/7.2.259/gvim-7-2-259.exe/download
> I see the problem. This actually happens because the "call" is > missing and "s:foo()" is a substitute command, just like "s/foo()//". > > When changing it to this: > > func! s:foo() > throw 'exception' > endfunc > > func! Foo() > try > silent s:foo() > catch > unsilent echo "EX: " . v:exception > endtry > endfunc > > You can see the error message: > EX: Vim(substitute):E486: Pattern not found: foo() > > But when the cursor is on the line with "silent" there is no error and ... because the :substitute succeeds (to explain it to myself and a few others). > the bug isn't trigerred. Which bug? Do you want to disallow this valid :subst-syntax? > I'll fix it. You want to disallow the ":"-char for separating :subst arguments? Ok. Worse: Require at least two :subst-separator chars. -- Andy --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
