aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorkevinhwang91 <kevin.hwang@live.com>2021-05-20 11:34:10 +0800
committerkevinhwang91 <kevin.hwang@live.com>2021-05-20 11:34:10 +0800
commit2dc0f812710b19f8befcfa64ef9335cadc510296 (patch)
tree6c01bf2f3ef154f74765ec731692e1a38deca509 /src/nvim/quickfix.c
parent19d4926f5a4390b4d96ea1638cc08e7798e625e2 (diff)
downloadrneovim-2dc0f812710b19f8befcfa64ef9335cadc510296.tar.gz
rneovim-2dc0f812710b19f8befcfa64ef9335cadc510296.tar.bz2
rneovim-2dc0f812710b19f8befcfa64ef9335cadc510296.zip
fixup! vim-patch:8.2.0959: using 'quickfixtextfunc' is a bit slow
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 0aff3218d3..ac27e92932 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -3932,16 +3932,16 @@ static int qf_buf_add_line(qf_list_T *qfl, buf_T *buf, linenr_T lnum,
buf_T *errbuf;
if (qftf_str != NULL) {
- STRLCPY(IObuff, qftf_str, IOSIZE - 1);
+ STRLCPY(IObuff, qftf_str, IOSIZE);
} else {
if (qfp->qf_module != NULL) {
- STRLCPY(IObuff, qfp->qf_module, IOSIZE - 1);
+ STRLCPY(IObuff, qfp->qf_module, IOSIZE);
len = (int)STRLEN(IObuff);
} else if (qfp->qf_fnum != 0
&& (errbuf = buflist_findnr(qfp->qf_fnum)) != NULL
&& errbuf->b_fname != NULL) {
if (qfp->qf_type == 1) { // :helpgrep
- STRLCPY(IObuff, path_tail(errbuf->b_fname), IOSIZE - 1);
+ STRLCPY(IObuff, path_tail(errbuf->b_fname), IOSIZE);
} else {
// Shorten the file name if not done already.
// For optimization, do this only for the first entry in a
@@ -3954,7 +3954,7 @@ static int qf_buf_add_line(qf_list_T *qfl, buf_T *buf, linenr_T lnum,
}
shorten_buf_fname(errbuf, dirname, false);
}
- STRLCPY(IObuff, errbuf->b_fname, IOSIZE - 1);
+ STRLCPY(IObuff, errbuf->b_fname, IOSIZE);
}
len = (int)STRLEN(IObuff);
} else {
@@ -4087,7 +4087,7 @@ static void qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last,
qftf_li = tv_list_first(qftf_list);
while (lnum < qfl->qf_count) {
- char_u *qftf_str = NULL;
+ char_u *qftf_str = NULL;
if (qftf_li != NULL) {
// Use the text supplied by the user defined function