diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_eval_stuff.vim | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index a45ca5c63e..988435fd19 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -4284,7 +4284,7 @@ static int 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) { tv_clear(rettv); } diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim index ff8f2e5fc7..4b54a0d39f 100644 --- a/src/nvim/testdir/test_eval_stuff.vim +++ b/src/nvim/testdir/test_eval_stuff.vim @@ -99,3 +99,12 @@ func Test_let_errmsg() call assert_fails('let v:errmsg = []', 'E730:') let v:errmsg = '' endfunc + +" Test fix for issue #4507 +func Test_skip_after_throw() + try + throw 'something' + let x = wincol() || &ts + catch /something/ + endtry +endfunc |