aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/map.h
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-11-15 18:21:45 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2020-01-14 12:57:31 +0100
commit55677ddc4637664c8ef034e5c91f79fae8a97396 (patch)
treeb24078814ebc311890d04f78084699e1db6f29fe /src/nvim/map.h
parent3d1531aee5d92375b69098de8f8c788ea407b066 (diff)
downloadrneovim-55677ddc4637664c8ef034e5c91f79fae8a97396.tar.gz
rneovim-55677ddc4637664c8ef034e5c91f79fae8a97396.tar.bz2
rneovim-55677ddc4637664c8ef034e5c91f79fae8a97396.zip
Add new marktree data structure for storing marks
This is inspired by Atom's "marker index" data structure to efficiently adjust marks to text insertions deletions, but uses a wide B-tree (derived from kbtree) to keep the nesting level down.
Diffstat (limited to 'src/nvim/map.h')
-rw-r--r--src/nvim/map.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/map.h b/src/nvim/map.h
index 75ab64cca4..fec91ac0c2 100644
--- a/src/nvim/map.h
+++ b/src/nvim/map.h
@@ -53,6 +53,8 @@ MAP_DECLS(String, handle_T)
#define map_del(T, U) map_##T##_##U##_del
#define map_clear(T, U) map_##T##_##U##_clear
+#define map_size(map) ((map)->table->size)
+
#define pmap_new(T) map_new(T, ptr_t)
#define pmap_free(T) map_free(T, ptr_t)
#define pmap_get(T) map_get(T, ptr_t)