// make place for a new list
qf_new_list(qi, qf_title);
qf_idx = qi->qf_curlist;
+ qfl = qf_get_list(qi, qf_idx);
}
else
{
// Adding to existing list, use last entry.
adding = TRUE;
- if (!qf_list_empty(qf_get_list(qi, qf_idx)))
- old_last = qi->qf_lists[qf_idx].qf_last;
+ qfl = qf_get_list(qi, qf_idx);
+ if (!qf_list_empty(qfl))
+ old_last = qfl->qf_last;
}
- qfl = qf_get_list(qi, qf_idx);
-
// Use the local value of 'errorformat' if it's set.
if (errorformat == p_efm && tv == NULL && *buf->b_p_efm != NUL)
efm = buf->b_p_efm;
// it if we have errors; otherwise, leave it closed.
if (qf_stack_empty(qi)
|| qfl->qf_nonevalid
- || qf_list_empty(qf_get_curlist(qi)))
+ || qf_list_empty(qfl))
{
if (win != NULL)
ex_cclose(eap);
*/
static int
vgr_match_buflines(
- qf_info_T *qi,
+ qf_list_T *qfl,
char_u *fname,
buf_T *buf,
regmmatch_T *regmatch,
// Pass the buffer number so that it gets used even for a
// dummy buffer, unless duplicate_name is set, then the
// buffer will be wiped out below.
- if (qf_add_entry(qf_get_curlist(qi),
+ if (qf_add_entry(qfl,
NULL, // dir
fname,
NULL,
{
// Try for a match in all lines of the buffer.
// For ":1vimgrep" look for first match only.
- found_match = vgr_match_buflines(qi, fname, buf, ®match,
+ found_match = vgr_match_buflines(qf_get_curlist(qi),
+ fname, buf, ®match,
&tomatch, duplicate_name, flags);
if (using_dummy)
*/
static void
hgr_search_file(
- qf_info_T *qi,
+ qf_list_T *qfl,
char_u *fname,
vimconv_T *p_vc,
regmatch_T *p_regmatch)
while (l > 0 && line[l - 1] <= ' ')
line[--l] = NUL;
- if (qf_add_entry(qf_get_curlist(qi),
+ if (qf_add_entry(qfl,
NULL, // dir
fname,
NULL,
*/
static void
hgr_search_files_in_dir(
- qf_info_T *qi,
+ qf_list_T *qfl,
char_u *dirname,
regmatch_T *p_regmatch,
vimconv_T *p_vc
continue;
#endif
- hgr_search_file(qi, fnames[fi], p_vc, p_regmatch);
+ hgr_search_file(qfl, fnames[fi], p_vc, p_regmatch);
}
FreeWild(fcount, fnames);
}
* specified language are found.
*/
static void
-hgr_search_in_rtp(qf_info_T *qi, regmatch_T *p_regmatch, char_u *lang)
+hgr_search_in_rtp(qf_list_T *qfl, regmatch_T *p_regmatch, char_u *lang)
{
char_u *p;
{
copy_option_part(&p, NameBuff, MAXPATHL, ",");
- hgr_search_files_in_dir(qi, NameBuff, p_regmatch, &vc
+ hgr_search_files_in_dir(qfl, NameBuff, p_regmatch, &vc
#ifdef FEAT_MULTI_LANG
, lang
#endif
// create a new quickfix list
qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep));
+ qfl = qf_get_curlist(qi);
- hgr_search_in_rtp(qi, ®match, lang);
+ hgr_search_in_rtp(qfl, ®match, lang);
vim_regfree(regmatch.regprog);
- qfl = qf_get_curlist(qi);
qfl->qf_nonevalid = FALSE;
qfl->qf_ptr = qfl->qf_start;
qfl->qf_index = 1;