aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2020-04-13 11:06:23 -0400
committerGitHub <noreply@github.com>2020-04-13 11:06:23 -0400
commit13b4a6fd4fa67794e76892cb362121a33a756f58 (patch)
tree31bd8bca21028be79e3111a53725144e854d92f5 /src/nvim/ex_docmd.c
parent46fdad255ead9ca484a6e512efe13b379b8fc8ab (diff)
parenta122f6c6d4d64ab6a3bcd55bde220dc115acd73c (diff)
downloadrneovim-13b4a6fd4fa67794e76892cb362121a33a756f58.tar.gz
rneovim-13b4a6fd4fa67794e76892cb362121a33a756f58.tar.bz2
rneovim-13b4a6fd4fa67794e76892cb362121a33a756f58.zip
Merge pull request #12073 from janlazo/vim-8.2.0027
vim-patch:8.1.{2366,2378,2387,2387},8.2.{27,560}
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 4f8bf63ffe..a86b8ec871 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -197,7 +197,7 @@ static void save_dbg_stuff(struct dbg_stuff *dsp)
static void restore_dbg_stuff(struct dbg_stuff *dsp)
{
- suppress_errthrow = FALSE;
+ suppress_errthrow = false;
trylevel = dsp->trylevel;
force_abort = dsp->force_abort;
caught_stack = dsp->caught_stack;
@@ -394,8 +394,8 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
* Initialize "force_abort" and "suppress_errthrow" at the top level.
*/
if (!recursive) {
- force_abort = FALSE;
- suppress_errthrow = FALSE;
+ force_abort = false;
+ suppress_errthrow = false;
}
// If requested, store and reset the global values controlling the
@@ -879,16 +879,14 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
xfree(sourcing_name);
sourcing_name = saved_sourcing_name;
sourcing_lnum = saved_sourcing_lnum;
+ } else if (got_int || (did_emsg && force_abort)) {
+ // On an interrupt or an aborting error not converted to an exception,
+ // disable the conversion of errors to exceptions. (Interrupts are not
+ // converted any more, here.) This enables also the interrupt message
+ // when force_abort is set and did_emsg unset in case of an interrupt
+ // from a finally clause after an error.
+ suppress_errthrow = true;
}
- /*
- * On an interrupt or an aborting error not converted to an exception,
- * disable the conversion of errors to exceptions. (Interrupts are not
- * converted any more, here.) This enables also the interrupt message
- * when force_abort is set and did_emsg unset in case of an interrupt
- * from a finally clause after an error.
- */
- else if (got_int || (did_emsg && force_abort))
- suppress_errthrow = TRUE;
}
// The current cstack will be freed when do_cmdline() returns. An uncaught