diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-08-22 02:47:10 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-08-22 02:47:10 -0400 |
commit | 2f2e729899f388bfcda89893a645620058c26520 (patch) | |
tree | 73097d5ab9a955cfa1bf8a1a3e3299624933d9b4 /src/nvim/quickfix.c | |
parent | ad4348095229e055750fb429f2c675393711b647 (diff) | |
parent | 8d8af6565963ac17239ec6ed620eebff6c101458 (diff) | |
download | rneovim-2f2e729899f388bfcda89893a645620058c26520.tar.gz rneovim-2f2e729899f388bfcda89893a645620058c26520.tar.bz2 rneovim-2f2e729899f388bfcda89893a645620058c26520.zip |
Merge commit 'refs/pull/upstream/5156'
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 dfd795b0ba..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_L) : 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); |