Mercurial > vim
diff src/quickfix.c @ 11447:698ee9d4fe9f v8.0.0607
patch 8.0.0607: after :bwipe + :new bufref might still be valid
commit https://github.com/vim/vim/commit/45e5fd135da5710f24a1acc142692f120f8b0b78
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 4 14:58:02 2017 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 04 Jun 2017 15:00:04 +0200 |
parents | 461ac47c3793 |
children | d2f00eb352b9 |
line wrap: on
line diff
--- a/src/quickfix.c +++ b/src/quickfix.c @@ -161,8 +161,8 @@ static qf_info_T *ll_get_or_alloc_list(w * 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)