diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-03-18 21:15:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-18 21:15:41 +0100 |
commit | 3bf57c117120327930fb39935d1672558f58d148 (patch) | |
tree | db13d8285458771b22084cb7f2e35a059d427707 /src/nvim/eval.c | |
parent | 4e02f1ab871f30d80250537877924d522497493b (diff) | |
download | rneovim-3bf57c117120327930fb39935d1672558f58d148.tar.gz rneovim-3bf57c117120327930fb39935d1672558f58d148.tar.bz2 rneovim-3bf57c117120327930fb39935d1672558f58d148.zip |
log/channels: Formatting. Also log loopback channel. #8146
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 4140eebdf6..feccec85c6 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -22521,11 +22521,13 @@ bool eval_has_provider(const char *name) } /// Writes "<sourcing_name>:<sourcing_lnum>" to `buf[bufsize]`. -void eval_format_source_name_line(char *buf, size_t bufsize) +void eval_fmt_source_name_line(char *buf, size_t bufsize) { - snprintf(buf, bufsize, "%s:%" PRIdLINENR, - (sourcing_name ? sourcing_name : (char_u *)"?"), - (sourcing_name ? sourcing_lnum : 0)); + if (sourcing_name) { + snprintf(buf, bufsize, "%s:%" PRIdLINENR, sourcing_name, sourcing_lnum); + } else { + snprintf(buf, bufsize, "?"); + } } /// ":checkhealth [plugins]" |