From f3dd65fbf193ef4e53a58919cb14264b376cd1b0 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 3 Apr 2012 13:39:20 +0000 Subject: add an OptionManager class and use it to manage tabstops OptionManager map names to options, and may delegate option resolution to it's parent if it does not contains the asked for option. That way Buffers can override global options, and Windows can override Buffer options. --- src/buffer.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/buffer.hh') diff --git a/src/buffer.hh b/src/buffer.hh index 83e5ffc7..fb142aec 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -7,6 +7,7 @@ #include #include "line_and_column.hh" +#include "option_manager.hh" namespace Kakoune { @@ -173,6 +174,8 @@ public: const String& line_content(size_t l) const { return m_lines[l].content; } + OptionManager& option_manager() { return m_option_manager; } + private: friend class BufferIterator; @@ -210,6 +213,8 @@ private: size_t m_last_save_undo_index; std::vector m_modification_listeners; + + OptionManager m_option_manager; }; inline Modification Modification::make_erase(BufferIterator begin, -- cgit v1.2.3