1
0
forked from aniani/vim

patch 8.0.0607: after :bwipe + :new bufref might still be valid

Problem:    When creating a bufref, then using :bwipe and :new it might get
            the same memory and bufref_valid() returns true.
Solution:   Add br_fnum to check the buffer number didn't change.
This commit is contained in:
Bram Moolenaar
2017-06-04 14:58:02 +02:00
parent 6e62da3e14
commit 45e5fd135d
6 changed files with 24 additions and 15 deletions

View File

@@ -161,8 +161,8 @@ static qf_info_T *ll_get_or_alloc_list(win_T *);
* 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};
static char_u *qf_last_bufname = NULL;
static bufref_T qf_last_bufref = {NULL, 0, 0};
/*
* Read the errorfile "efile" into memory, line by line, building the error
@@ -2732,7 +2732,7 @@ qf_history(exarg_T *eap)
}
/*
* Free error list "idx".
* Free all the entries in the error list "idx".
*/
static void
qf_free(qf_info_T *qi, int idx)