diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-10-10 11:20:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-10 11:20:43 +0200 |
commit | 8c7c8f596268eb46f17143f31a024d4c72192e1b (patch) | |
tree | b89e092949ac181611aecd8a21d6d5975f2b207c /src/nvim/eval.c | |
parent | f4b2b66661893c1ca80b1b662b826bc2307fcc36 (diff) | |
parent | 0394cb23e93858de2cd77b5cecf008d55e5a7717 (diff) | |
download | rneovim-8c7c8f596268eb46f17143f31a024d4c72192e1b.tar.gz rneovim-8c7c8f596268eb46f17143f31a024d4c72192e1b.tar.bz2 rneovim-8c7c8f596268eb46f17143f31a024d4c72192e1b.zip |
Merge #8954 from janlazo/vim-8.0.1423
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 9c678168bb..515dd0e69f 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -21797,15 +21797,15 @@ void ex_return(exarg_T *eap) } else { tv_clear(&rettv); } - } - /* It's safer to return also on error. */ - else if (!eap->skip) { - /* - * Return unless the expression evaluation has been cancelled due to an - * aborting error, an interrupt, or an exception. - */ - if (!aborting()) - returning = do_return(eap, FALSE, TRUE, NULL); + } else if (!eap->skip) { // It's safer to return also on error. + // In return statement, cause_abort should be force_abort. + update_force_abort(); + + // Return unless the expression evaluation has been cancelled due to an + // aborting error, an interrupt, or an exception. + if (!aborting()) { + returning = do_return(eap, false, true, NULL); + } } /* When skipping or the return gets pending, advance to the next command |