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.
diff --git a/src/structs.h b/src/structs.h
index 0175017..d79b225 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -69,11 +69,13 @@
typedef int scid_T; /* script ID */
typedef struct file_buffer buf_T; /* forward declaration */
-/* Reference to a buffer that stores the value of buf_free_count.
+/*
+ * Reference to a buffer that stores the value of buf_free_count.
* bufref_valid() only needs to check "buf" when the count differs.
*/
typedef struct {
buf_T *br_buf;
+ int br_fnum;
int br_buf_free_count;
} bufref_T;