diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2011-09-08 00:11:48 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2011-09-08 00:11:48 +0000 |
| commit | 535e2005870ce6e0822418307bde22b09b8db3df (patch) | |
| tree | 251446a697f0609e29b28b96484c0bf6bdc25d33 /src/buffer.cc | |
| parent | 511df5b6605b6dd6d350dac4643cd1255771d869 (diff) | |
Add a BufferManager singleton class, handling buffer lifetime
it also provide access to buffers by name
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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 <cassert> 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(); } |
