patch 8.2.0267: no check for a following cmd when calling a function fails
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)
			
			
This commit is contained in:
		| @ -162,3 +162,7 @@ endfunc | |||||||
| func Test_user_method() | func Test_user_method() | ||||||
|   eval 'bar'->s:addFoo()->assert_equal('barfoo') |   eval 'bar'->s:addFoo()->assert_equal('barfoo') | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
|  | func Test_failed_call_in_try() | ||||||
|  |   try | call UnknownFunc() | catch | endtry | ||||||
|  | endfunc | ||||||
|  | |||||||
| @ -3554,7 +3554,8 @@ ex_call(exarg_T *eap) | |||||||
|     if (eap->skip) |     if (eap->skip) | ||||||
| 	--emsg_skip; | 	--emsg_skip; | ||||||
|  |  | ||||||
|     if (!failed) |     // 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. | 	// Check for trailing illegal characters and a following command. | ||||||
| 	if (!ends_excmd(*arg)) | 	if (!ends_excmd(*arg)) | ||||||
|  | |||||||
| @ -742,6 +742,8 @@ static char *(features[]) = | |||||||
|  |  | ||||||
| static int included_patches[] = | static int included_patches[] = | ||||||
| {   /* Add new patch number below this line */ | {   /* Add new patch number below this line */ | ||||||
|  | /**/ | ||||||
|  |     267, | ||||||
| /**/ | /**/ | ||||||
|     266, |     266, | ||||||
| /**/ | /**/ | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user