Mercurial > vim
diff src/ex_docmd.c @ 24369:a97fb00978f6 v8.2.2725
patch 8.2.2725: Vim9: message about compiling is wrong when using try/catch
Commit: https://github.com/vim/vim/commit/e8c4660a55364a5d3e395652d1202b8702666823
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 5 22:27:37 2021 +0200
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 https://github.com/vim/vim/issues/8071)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Apr 2021 22:45:27 +0200 |
parents | b471a413d36a |
children | 9299d21d1d5d |
line wrap: on
line diff
--- 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); }