diff options
author | Daniel Hahler <git@thequod.de> | 2019-08-15 20:18:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-15 20:18:09 +0200 |
commit | abfc8b3257f8dd945bfb458d94b5981a6e322861 (patch) | |
tree | 3bf97041916d731529b583eef7c67db767d26cc3 | |
parent | 6261d2658fdff93a732b02d8fd6e386245968f2d (diff) | |
download | rneovim-abfc8b3257f8dd945bfb458d94b5981a6e322861.tar.gz rneovim-abfc8b3257f8dd945bfb458d94b5981a6e322861.tar.bz2 rneovim-abfc8b3257f8dd945bfb458d94b5981a6e322861.zip |
emsg_multiline: log Vim errors (#10778)
-rw-r--r-- | src/nvim/message.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index 6e935022ca..9bea9f5c4a 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -582,9 +582,25 @@ static bool emsg_multiline(const char *s, bool multiline) } redir_write(s, strlen(s)); } + + // Log (silent) errors as debug messages. + if (sourcing_name != NULL && sourcing_lnum != 0) { + DLOG("(:silent) %s (%s (line %ld))", + s, sourcing_name, (long)sourcing_lnum); + } else { + DLOG("(:silent) %s", s); + } + return true; } + // Log editor errors as INFO. + if (sourcing_name != NULL && sourcing_lnum != 0) { + ILOG("%s (%s (line %ld))", s, sourcing_name, (long)sourcing_lnum); + } else { + ILOG("%s", s); + } + ex_exitval = 1; // Reset msg_silent, an error causes messages to be switched back on. |