Patch 8.2.0267
Problem: No check for a following command when calling a function fails.
Solution: Also check for a following command when inside a try block.
(closes #5642)
Files: src/userfunc.c, src/testdir/test_user_func.vim
*** ../vim-8.2.0266/src/userfunc.c 2020-02-06 19:25:02.624298180 +0100
--- src/userfunc.c 2020-02-16 19:41:33.605644452 +0100
***************
*** 3554,3560 ****
if (eap->skip)
--emsg_skip;
! if (!failed)
{
// Check for trailing illegal characters and a following command.
if (!ends_excmd(*arg))
--- 3554,3561 ----
if (eap->skip)
--emsg_skip;
! // When inside :try we need to check for following "| catch".
! if (!failed || eap->cstack->cs_trylevel > 0)
{
// Check for trailing illegal characters and a following command.
if (!ends_excmd(*arg))
*** ../vim-8.2.0266/src/testdir/test_user_func.vim 2020-01-30
18:24:47.001204003 +0100
--- src/testdir/test_user_func.vim 2020-02-16 19:39:20.918338671 +0100
***************
*** 162,164 ****
--- 162,168 ----
func Test_user_method()
eval 'bar'->s:addFoo()->assert_equal('barfoo')
endfunc
+
+ func Test_failed_call_in_try()
+ try | call UnknownFunc() | catch | endtry
+ endfunc
*** ../vim-8.2.0266/src/version.c 2020-02-16 17:04:04.934149377 +0100
--- src/version.c 2020-02-16 19:39:44.838211520 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 267,
/**/
--
>From "know your smileys":
!-| I-am-a-Cylon-Centurian-with-one-red-eye-bouncing-back-and-forth
/// 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202002161843.01GIhoDB015659%40masaka.moolenaar.net.