From 535e2005870ce6e0822418307bde22b09b8db3df Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 8 Sep 2011 00:11:48 +0000 Subject: Add a BufferManager singleton class, handling buffer lifetime it also provide access to buffers by name --- src/buffer.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/buffer.cc') diff --git a/src/buffer.cc b/src/buffer.cc index 5e42a295..2a09cc5b 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -1,4 +1,7 @@ #include "buffer.hh" + +#include "buffer_manager.hh" + #include namespace Kakoune @@ -122,6 +125,8 @@ Buffer::Buffer(const std::string& name, const BufferString& initial_content) : m_name(name), m_history(1), m_history_cursor(m_history.begin()), m_content(initial_content) { + BufferManager::instance().register_buffer(this); + compute_lines(); } -- cgit v1.2.3