Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/quickfix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,13 @@ qf_parse_line(
return QF_OK;
}

/*
* Looking up a buffer can be slow if there are many. Remember the last one
* to make this a lot faster if there are multiple matches in the same file.
*/
static char_u *qf_last_bufname = NULL;
static bufref_T qf_last_bufref = {NULL, 0};

/*
* Read the errorfile "efile" into memory, line by line, building the error
* list.
Expand Down Expand Up @@ -1151,6 +1158,8 @@ qf_init_ext(
int retval = -1; /* default: return error flag */
int status;

qf_last_bufname = NULL;

vim_memset(&state, 0, sizeof(state));
vim_memset(&fields, 0, sizeof(fields));
#ifdef FEAT_MBYTE
Expand Down Expand Up @@ -1659,13 +1668,6 @@ copy_loclist(win_T *from, win_T *to)
to->w_llist->qf_curlist = qi->qf_curlist; /* current list */
}

/*
* Looking up a buffer can be slow if there are many. Remember the last one
* to make this a lot faster if there are multiple matches in the same file.
*/
static char_u *qf_last_bufname = NULL;
static bufref_T qf_last_bufref = {NULL, 0};

/*
* Get buffer number for file "directory/fname".
* Also sets the b_has_qf_entry flag.
Expand Down