mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 08:56:29 +00:00
extmark: refiy "Decoration" abstraction
one very important thought
This commit is contained in:

committed by
Thomas Vigouroux

parent
3acfefb63e
commit
54ce1010e8
@@ -12,14 +12,21 @@ typedef struct {
|
||||
typedef kvec_t(VirtTextChunk) VirtText;
|
||||
#define VIRTTEXT_EMPTY ((VirtText)KV_INITIAL_VALUE)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int hl_id; // highlight group
|
||||
VirtText virt_text;
|
||||
// TODO(bfredl): style, signs, etc
|
||||
} Decoration;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint64_t ns_id;
|
||||
uint64_t mark_id;
|
||||
int hl_id; // highlight group
|
||||
// TODO(bfredl): virt_text is pretty larger than the rest,
|
||||
// pointer indirection?
|
||||
VirtText virt_text;
|
||||
// TODO(bfredl): a lot of small allocations. Should probably use
|
||||
// kvec_t(Decoration) as an arena. Alternatively, store ns_id/mark_id
|
||||
// _inline_ in MarkTree and use the map only for decorations.
|
||||
Decoration *decor;
|
||||
} ExtmarkItem;
|
||||
|
||||
typedef struct undo_object ExtmarkUndoObject;
|
||||
|
Reference in New Issue
Block a user