emsg_multiline: log Vim errors (#10778)

This commit is contained in:
Daniel Hahler 2019-08-15 20:18:09 +02:00 committed by GitHub
parent 6261d2658f
commit abfc8b3257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.