diff options
author | Tommy Allen <tommy@esdf.io> | 2016-08-03 17:24:26 -0400 |
---|---|---|
committer | Tommy Allen <tommy@esdf.io> | 2016-08-17 17:48:15 -0400 |
commit | 8d8af6565963ac17239ec6ed620eebff6c101458 (patch) | |
tree | d0cd47df65a820e76ec9d62d94e256a78517b56c /src/nvim/quickfix.c | |
parent | 605e74327a406682f317d07e0097690fc1e577cb (diff) | |
download | rneovim-8d8af6565963ac17239ec6ed620eebff6c101458.tar.gz rneovim-8d8af6565963ac17239ec6ed620eebff6c101458.tar.bz2 rneovim-8d8af6565963ac17239ec6ed620eebff6c101458.zip |
Linting
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index ba2d795eef..698f05c029 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -1764,16 +1764,18 @@ void qf_list(exarg_T *eap) vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", i, (char *)fname); msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index - ? hl_attr(HLF_QFL) : hl_attr(HLF_D)); - if (qfp->qf_lnum == 0) + ? hl_attr(HLF_QFL) : hl_attr(HLF_D)); + if (qfp->qf_lnum == 0) { IObuff[0] = NUL; - else if (qfp->qf_col == 0) - sprintf((char *)IObuff, ":%" PRId64, (int64_t)qfp->qf_lnum); - else - sprintf((char *)IObuff, ":%" PRId64 " col %d", - (int64_t)qfp->qf_lnum, qfp->qf_col); - sprintf((char *)IObuff + STRLEN(IObuff), "%s:", - (char *)qf_types(qfp->qf_type, qfp->qf_nr)); + } else if (qfp->qf_col == 0) { + vim_snprintf((char *)IObuff, IOSIZE, ":%" PRId64, + (int64_t)qfp->qf_lnum); + } else { + vim_snprintf((char *)IObuff, IOSIZE, ":%" PRId64 " col %d", + (int64_t)qfp->qf_lnum, qfp->qf_col); + } + vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE, "%s:", + (char *)qf_types(qfp->qf_type, qfp->qf_nr)); msg_puts_attr(IObuff, hl_attr(HLF_N)); if (qfp->qf_pattern != NULL) { qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE); |