mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
vim-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.
b25f9a97e9
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
|
||||
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;
|
||||
|
||||
// for garray_T
|
||||
#include "nvim/garray.h"
|
||||
// for pos_T, lpos_T and linenr_T
|
||||
|
Reference in New Issue
Block a user