summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-04-05 22:27:37 +0200
committerBram Moolenaar <Bram@vim.org>2021-04-05 22:27:37 +0200
commite8c4660a55364a5d3e395652d1202b8702666823 (patch)
tree938228d7a0896d373c599b31f32fcd378ee89a33 /src/ex_docmd.c
parent0d351a04e137b5c25dd558476182e4cbc81a287d (diff)
downloadvim-git-e8c4660a55364a5d3e395652d1202b8702666823.tar.gz
patch 8.2.2725: Vim9: message about compiling is wrong when using try/catchv8.2.2725
Problem: Vim9: message about compiling is wrong when using try/catch. Solution: Store the compiling flag with the message. (closes #8071)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index b4e35537d..c8cb11ba7 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -1266,7 +1266,7 @@ do_cmdline(
if (did_throw)
{
char *p = NULL;
- msglist_T *messages = NULL, *next;
+ msglist_T *messages = NULL;
/*
* If the uncaught exception is a user exception, report it as an
@@ -1303,12 +1303,16 @@ do_cmdline(
{
do
{
- next = messages->next;
+ msglist_T *next = messages->next;
+ int save_compiling = estack_compiling;
+
+ estack_compiling = messages->msg_compiling;
emsg(messages->msg);
vim_free(messages->msg);
vim_free(messages->sfile);
vim_free(messages);
messages = next;
+ estack_compiling = save_compiling;
}
while (messages != NULL);
}