*/
#define GET_LOC_LIST(wp) (IS_LL_WINDOW(wp) ? wp->w_llist_ref : wp->w_llist)
+/*
+ * 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. Set the error list's title to qf_title.
int retval = -1; /* default: return error flag */
int status;
+ /* Do not used the cached buffer, it may have been wiped out. */
+ vim_free(qf_last_bufname);
+ qf_last_bufname = NULL;
+
vim_memset(&state, 0, sizeof(state));
vim_memset(&fields, 0, sizeof(fields));
#ifdef FEAT_MBYTE
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.