mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 7.4.2018
Problem: buf_valid() can be slow when there are many buffers. Solution: Add bufref_valid(), only go through the buffer list when a buffer was freed.
This commit is contained in:
@@ -69,6 +69,14 @@ typedef struct frame_S frame_T;
|
||||
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.
|
||||
* bufref_valid() only needs to check "buf" when the count differs.
|
||||
*/
|
||||
typedef struct {
|
||||
buf_T *br_buf;
|
||||
int br_buf_free_count;
|
||||
} bufref_T;
|
||||
|
||||
/*
|
||||
* This is here because regexp.h needs pos_T and below regprog_T is used.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user