bufhl: new mechanism for plugins to add highlights to a buffer

This commit is contained in:
Björn Linse
2015-01-18 15:05:04 +01:00
parent 18605d6785
commit 44b2cef83a
12 changed files with 421 additions and 25 deletions

View File

@@ -28,6 +28,8 @@ typedef struct file_buffer buf_T; // Forward declaration
#include "nvim/profile.h"
// for String
#include "nvim/api/private/defs.h"
// for Map(K, V)
#include "nvim/map.h"
#define MODIFIABLE(buf) (!buf->terminal && buf->b_p_ma)
@@ -101,6 +103,11 @@ typedef int scid_T; /* script ID */
// for signlist_T
#include "nvim/sign_defs.h"
// for bufhl_*_T
#include "nvim/bufhl_defs.h"
typedef Map(linenr_T, bufhl_vec_T) bufhl_info_T;
// for FileID
#include "nvim/os/fs_defs.h"
@@ -754,6 +761,8 @@ struct file_buffer {
dict_T *additional_data; // Additional data from shada file if any.
int b_mapped_ctrl_c; // modes where CTRL-C is mapped
bufhl_info_T *b_bufhl_info; // buffer stored highlights
};
/*