mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
fixup! vim-patch:8.2.0959: using 'quickfixtextfunc' is a bit slow
This commit is contained in:
@@ -3932,16 +3932,16 @@ static int qf_buf_add_line(qf_list_T *qfl, buf_T *buf, linenr_T lnum,
|
|||||||
buf_T *errbuf;
|
buf_T *errbuf;
|
||||||
|
|
||||||
if (qftf_str != NULL) {
|
if (qftf_str != NULL) {
|
||||||
STRLCPY(IObuff, qftf_str, IOSIZE - 1);
|
STRLCPY(IObuff, qftf_str, IOSIZE);
|
||||||
} else {
|
} else {
|
||||||
if (qfp->qf_module != NULL) {
|
if (qfp->qf_module != NULL) {
|
||||||
STRLCPY(IObuff, qfp->qf_module, IOSIZE - 1);
|
STRLCPY(IObuff, qfp->qf_module, IOSIZE);
|
||||||
len = (int)STRLEN(IObuff);
|
len = (int)STRLEN(IObuff);
|
||||||
} else if (qfp->qf_fnum != 0
|
} else if (qfp->qf_fnum != 0
|
||||||
&& (errbuf = buflist_findnr(qfp->qf_fnum)) != NULL
|
&& (errbuf = buflist_findnr(qfp->qf_fnum)) != NULL
|
||||||
&& errbuf->b_fname != NULL) {
|
&& errbuf->b_fname != NULL) {
|
||||||
if (qfp->qf_type == 1) { // :helpgrep
|
if (qfp->qf_type == 1) { // :helpgrep
|
||||||
STRLCPY(IObuff, path_tail(errbuf->b_fname), IOSIZE - 1);
|
STRLCPY(IObuff, path_tail(errbuf->b_fname), IOSIZE);
|
||||||
} else {
|
} else {
|
||||||
// Shorten the file name if not done already.
|
// Shorten the file name if not done already.
|
||||||
// For optimization, do this only for the first entry in a
|
// 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);
|
shorten_buf_fname(errbuf, dirname, false);
|
||||||
}
|
}
|
||||||
STRLCPY(IObuff, errbuf->b_fname, IOSIZE - 1);
|
STRLCPY(IObuff, errbuf->b_fname, IOSIZE);
|
||||||
}
|
}
|
||||||
len = (int)STRLEN(IObuff);
|
len = (int)STRLEN(IObuff);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user