diff options
author | Daniel Hahler <git@thequod.de> | 2019-06-08 19:57:54 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-06-08 19:57:54 +0200 |
commit | 3dd31b2b65054456f561d049f5a367d1ffa76fad (patch) | |
tree | 3c93f58a0f58a4b17cfd46b947c0d42fe6f5667b /src | |
parent | b398b1eeddb2118e5e00e2341d80626496488021 (diff) | |
download | rneovim-3dd31b2b65054456f561d049f5a367d1ffa76fad.tar.gz rneovim-3dd31b2b65054456f561d049f5a367d1ffa76fad.tar.bz2 rneovim-3dd31b2b65054456f561d049f5a367d1ffa76fad.zip |
vim-patch:8.1.1491: fix skipping after exception #10164
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 vim/vim#4507)
https://github.com/vim/vim/commit/606407384144df73a6154aca1d77e071fe1b7651
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 |