blob: 0667a82a623cc52bd523f63e23ac5dca9a9234bb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef NVIM_BUFHL_DEFS_H
#define NVIM_BUFHL_DEFS_H
#include "nvim/pos.h"
#include "nvim/lib/kvec.h"
#include "nvim/lib/kbtree.h"
// bufhl: buffer specific highlighting
struct bufhl_hl_item
{
int src_id;
int hl_id; // highlight group
colnr_T start; // first column to highlight
colnr_T stop; // last column to highlight
};
typedef struct bufhl_hl_item bufhl_hl_item_T;
typedef kvec_t(struct bufhl_hl_item) bufhl_vec_T;
typedef struct {
linenr_T line;
bufhl_vec_T items;
} BufhlLine;
typedef struct {
bufhl_vec_T entries;
int current;
colnr_T valid_to;
} bufhl_lineinfo_T;
#define BUFHL_CMP(a, b) (((b)->line - (a)->line))
KBTREE_INIT(bufhl, BufhlLine *, BUFHL_CMP)
typedef kbtree_t(bufhl) bufhl_info_T;
#endif // NVIM_BUFHL_DEFS_H
|