Problem: When skipping over code after an exception was thrown expression
evaluation is aborted after a function call. (Ingo Karkat)
Solution: Do not fail if not executing the expression. (closes #4507)
/* Stop the expression evaluation when immediately
* aborting on error, or when an interrupt occurred or
* an exception was thrown but not caught. */
- if (aborting())
+ if (evaluate && aborting())
{
if (ret == OK)
clear_tv(rettv);
call assert_fails('source Xversionscript', 'E999:')
call delete('Xversionscript')
endfunc
+
+" Test fix for issue #4507
+func Test_skip_after_throw()
+ try
+ throw 'something'
+ let x = wincol() || &ts
+ catch /something/
+ endtry
+endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1491,
/**/
1490,
/**/