diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-04-13 20:50:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-13 20:50:44 +0100 |
commit | a9cd9de01d8a7ad7bfa6738bccd5476cd4336a37 (patch) | |
tree | 2a349be7d2d601a69aa7d59aec9893c412c0112f /src/nvim/eval/userfunc.c | |
parent | 9a357043333cee38846a7a9a764cdae96d0856fd (diff) | |
parent | 76e6b81b23c59ee119d6cc34eed0ef580f15db07 (diff) | |
download | rneovim-a9cd9de01d8a7ad7bfa6738bccd5476cd4336a37.tar.gz rneovim-a9cd9de01d8a7ad7bfa6738bccd5476cd4336a37.tar.bz2 rneovim-a9cd9de01d8a7ad7bfa6738bccd5476cd4336a37.zip |
Merge pull request #15972 from seandewar/vim-8.2.3487
vim-patch:8.2.{3416,3448,3470,3478,3480,3486,3487}
Diffstat (limited to 'src/nvim/eval/userfunc.c')
-rw-r--r-- | src/nvim/eval/userfunc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index eb5c6e503a..0fadc0d220 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -3017,11 +3017,12 @@ void ex_call(exarg_T *eap) } } - // When inside :try we need to check for following "| catch". - if (!failed || eap->cstack->cs_trylevel > 0) { + // When inside :try we need to check for following "| catch" or "| endtry". + // Not when there was an error, but do check if an exception was thrown. + if ((!aborting() || current_exception != NULL) && (!failed || eap->cstack->cs_trylevel > 0)) { // Check for trailing illegal characters and a following command. if (!ends_excmd(*arg)) { - if (!failed) { + if (!failed && !aborting()) { emsg_severe = true; emsg(_(e_trailing)); } |