summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-06-04 14:58:02 +0200
committerBram Moolenaar <Bram@vim.org>2017-06-04 14:58:02 +0200
commit45e5fd135da5710f24a1acc142692f120f8b0b78 (patch)
treedb3f8e21176d61550e6c7dbb75dc69faf614c272 /src/quickfix.c
parent6e62da3e14d32f76f60d5cc8b267059923842f17 (diff)
downloadvim-git-8.0.0607.tar.gz
patch 8.0.0607: after :bwipe + :new bufref might still be validv8.0.0607
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.
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 6de55f75d..e330e6e9b 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -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)