0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.2036

Problem:    Looking up a buffer by number is slow if there are many.
Solution:   Use a hashtab.
This commit is contained in:
Bram Moolenaar
2016-07-14 22:09:39 +02:00
parent da4127794a
commit 480778b805
3 changed files with 45 additions and 8 deletions

View File

@@ -1753,6 +1753,9 @@ struct file_buffer
unsigned int b_fab_mrs; /* Max record size */
#endif
int b_fnum; /* buffer number for this file. */
char_u b_key[VIM_SIZEOF_INT * 2 + 1];
/* key used for buf_hashtab, holds b_fnum as
hex string */
int b_changed; /* 'modified': Set to TRUE if something in the
file has been changed and not written out. */