summaryrefslogtreecommitdiff
path: root/src/memory.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-10-08 22:09:50 +1100
committerMaxime Coste <mawww@kakoune.org>2018-10-14 09:48:39 +1100
commit194a5db5d636a343fe4edb07a727cab93aa8315e (patch)
tree671abd6409a29a50a712c62eaff88a2ccde7e152 /src/memory.hh
parentdd0e4310a745064c1390358b5493d2ae585e156e (diff)
maintain a list of valid ranges for region highlighting
This should greatly reduce memory usage by only caching matches for ranges that needs to be highlighted, in the case where multiple regions are nested, this means only the topmost region needs to parse and cache the whole buffer, other regions highlighter will only ensure the lines for the ranges they are called up are cached. Fixes #2454
Diffstat (limited to 'src/memory.hh')
-rw-r--r--src/memory.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/memory.hh b/src/memory.hh
index 062081d1..0d0460bc 100644
--- a/src/memory.hh
+++ b/src/memory.hh
@@ -20,6 +20,7 @@ enum class MemoryDomain
BufferMeta,
Options,
Highlight,
+ Regions,
Display,
Mapping,
Commands,
@@ -51,6 +52,7 @@ inline const char* domain_name(MemoryDomain domain)
case MemoryDomain::BufferMeta: return "BufferMeta";
case MemoryDomain::Options: return "Options";
case MemoryDomain::Highlight: return "Highlight";
+ case MemoryDomain::Regions: return "Regions";
case MemoryDomain::Display: return "Display";
case MemoryDomain::Mapping: return "Mapping";
case MemoryDomain::Commands: return "Commands";