diff --git a/src/buffer.hh b/src/buffer.hh index cc09831b..5f171e75 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -178,8 +178,10 @@ public: const String& line_content(size_t l) const { return m_lines[l].content; } - OptionManager& option_manager() { return m_option_manager; } - HookManager& hook_manager() { return m_hook_manager; } + OptionManager& option_manager() { return m_option_manager; } + const OptionManager& option_manager() const { return m_option_manager; } + HookManager& hook_manager() { return m_hook_manager; } + const HookManager& hook_manager() const { return m_hook_manager; } private: friend class BufferIterator; diff --git a/src/window.hh b/src/window.hh index d36755fe..455830e5 100644 --- a/src/window.hh +++ b/src/window.hh @@ -36,8 +36,11 @@ public: HighlighterGroup& highlighters() { return m_highlighters; } - HookManager& hook_manager() { return m_hook_manager; } - OptionManager& option_manager() { return m_option_manager; } + OptionManager& option_manager() { return m_option_manager; } + const OptionManager& option_manager() const { return m_option_manager; } + HookManager& hook_manager() { return m_hook_manager; } + const HookManager& hook_manager() const { return m_hook_manager; } + private: friend class Buffer;