From 0ff415597ec40942b18b42c1126d40ca5650304b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 21 Jan 2015 13:35:46 +0000 Subject: [PATCH] Add Display memory domain --- src/display_buffer.hh | 6 +++--- src/memory.hh | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/display_buffer.hh b/src/display_buffer.hh index 1ddb9f44..3d3da830 100644 --- a/src/display_buffer.hh +++ b/src/display_buffer.hh @@ -11,7 +11,7 @@ namespace Kakoune class Buffer; -struct DisplayAtom +struct DisplayAtom : public UseMemoryDomain { public: enum Type { BufferRange, ReplacedBufferRange, Text }; @@ -82,7 +82,7 @@ private: using BufferRange = std::pair; using AtomList = Vector; -class DisplayLine +class DisplayLine : public UseMemoryDomain { public: using iterator = AtomList::iterator; @@ -123,7 +123,7 @@ private: AtomList m_atoms; }; -class DisplayBuffer +class DisplayBuffer : public UseMemoryDomain { public: using LineList = Vector; diff --git a/src/memory.hh b/src/memory.hh index 3c45f392..5fb52a17 100644 --- a/src/memory.hh +++ b/src/memory.hh @@ -19,6 +19,7 @@ enum class MemoryDomain BufferMeta, Options, Highlight, + Display, Mapping, Commands, Hooks, @@ -44,6 +45,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::Display: return "Display"; case MemoryDomain::Mapping: return "Mapping"; case MemoryDomain::Commands: return "Commands"; case MemoryDomain::Hooks: return "Hooks";