Add Display memory domain

This commit is contained in:
Maxime Coste 2015-01-21 13:35:46 +00:00
parent b2d5b9ca5f
commit 0ff415597e
2 changed files with 5 additions and 3 deletions

View File

@ -11,7 +11,7 @@ namespace Kakoune
class Buffer; class Buffer;
struct DisplayAtom struct DisplayAtom : public UseMemoryDomain<MemoryDomain::Display>
{ {
public: public:
enum Type { BufferRange, ReplacedBufferRange, Text }; enum Type { BufferRange, ReplacedBufferRange, Text };
@ -82,7 +82,7 @@ private:
using BufferRange = std::pair<ByteCoord, ByteCoord>; using BufferRange = std::pair<ByteCoord, ByteCoord>;
using AtomList = Vector<DisplayAtom>; using AtomList = Vector<DisplayAtom>;
class DisplayLine class DisplayLine : public UseMemoryDomain<MemoryDomain::Display>
{ {
public: public:
using iterator = AtomList::iterator; using iterator = AtomList::iterator;
@ -123,7 +123,7 @@ private:
AtomList m_atoms; AtomList m_atoms;
}; };
class DisplayBuffer class DisplayBuffer : public UseMemoryDomain<MemoryDomain::Display>
{ {
public: public:
using LineList = Vector<DisplayLine>; using LineList = Vector<DisplayLine>;

View File

@ -19,6 +19,7 @@ enum class MemoryDomain
BufferMeta, BufferMeta,
Options, Options,
Highlight, Highlight,
Display,
Mapping, Mapping,
Commands, Commands,
Hooks, Hooks,
@ -44,6 +45,7 @@ inline const char* domain_name(MemoryDomain domain)
case MemoryDomain::BufferMeta: return "BufferMeta"; case MemoryDomain::BufferMeta: return "BufferMeta";
case MemoryDomain::Options: return "Options"; case MemoryDomain::Options: return "Options";
case MemoryDomain::Highlight: return "Highlight"; case MemoryDomain::Highlight: return "Highlight";
case MemoryDomain::Display: return "Display";
case MemoryDomain::Mapping: return "Mapping"; case MemoryDomain::Mapping: return "Mapping";
case MemoryDomain::Commands: return "Commands"; case MemoryDomain::Commands: return "Commands";
case MemoryDomain::Hooks: return "Hooks"; case MemoryDomain::Hooks: return "Hooks";