0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2725: Vim9: message about compiling is wrong when using try/catch

Problem:    Vim9: message about compiling is wrong when using try/catch.
Solution:   Store the compiling flag with the message. (closes #8071)
This commit is contained in:
Bram Moolenaar
2021-04-05 22:27:37 +02:00
parent 0d351a04e1
commit e8c4660a55
5 changed files with 50 additions and 7 deletions

View File

@@ -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);
}