# HG changeset patch # User Bram Moolenaar # Date 1559943006 -7200 # Node ID 301f6deea057a65314e46828341a4cc9bbfd86d4 # Parent 873f8aedfb6c6118373150b8d21735b2e5ea8d54 patch 8.1.1491: when skipping over code a function call may cause trouble commit https://github.com/vim/vim/commit/606407384144df73a6154aca1d77e071fe1b7651 Author: Bram Moolenaar Date: Fri Jun 7 23:15:22 2019 +0200 patch 8.1.1491: when skipping over code a function call may cause trouble 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) diff --git a/src/eval.c b/src/eval.c --- a/src/eval.c +++ b/src/eval.c @@ -4592,7 +4592,7 @@ eval7( /* 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); diff --git a/src/testdir/test_eval_stuff.vim b/src/testdir/test_eval_stuff.vim --- a/src/testdir/test_eval_stuff.vim +++ b/src/testdir/test_eval_stuff.vim @@ -178,3 +178,12 @@ func Test_scriptversion() 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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1491, +/**/ 1490, /**/ 1489,