aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/extmark_defs.h
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-01-21 13:50:22 +0100
committerThomas Vigouroux <tomvig38@gmail.com>2020-09-03 10:23:52 +0200
commit54ce1010e86cbb29067aabfc332dab59b5a88edb (patch)
tree7c1ef5abd9ae4f55c02c733fdbfababa3ad2e848 /src/nvim/extmark_defs.h
parent3acfefb63ee70c8eac13bf6b308a0e73e6fb8007 (diff)
downloadrneovim-54ce1010e86cbb29067aabfc332dab59b5a88edb.tar.gz
rneovim-54ce1010e86cbb29067aabfc332dab59b5a88edb.tar.bz2
rneovim-54ce1010e86cbb29067aabfc332dab59b5a88edb.zip
extmark: refiy "Decoration" abstraction
one very important thought
Diffstat (limited to 'src/nvim/extmark_defs.h')
-rw-r--r--src/nvim/extmark_defs.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/nvim/extmark_defs.h b/src/nvim/extmark_defs.h
index c927048981..899fbdf38a 100644
--- a/src/nvim/extmark_defs.h
+++ b/src/nvim/extmark_defs.h
@@ -14,12 +14,19 @@ typedef kvec_t(VirtTextChunk) VirtText;
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): style, signs, etc
+} Decoration;
+
+typedef struct
+{
+ uint64_t ns_id;
+ uint64_t mark_id;
+ // 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;