diff --git a/src/buffer_manager.cc b/src/buffer_manager.cc index 3398be34..9568c33e 100644 --- a/src/buffer_manager.cc +++ b/src/buffer_manager.cc @@ -16,21 +16,13 @@ struct name_not_unique : runtime_error name_not_unique() : runtime_error("buffer name is already in use") {} }; -BufferManager::BufferManager() -{ - kak_assert(ClientManager::has_instance()); -} - BufferManager::~BufferManager() { - kak_assert(ClientManager::has_instance()); + kak_assert(not ClientManager::has_instance()); // delete remaining buffers while (not m_buffers.empty()) - { - ClientManager::instance().ensure_no_client_uses_buffer(*m_buffers.front().get()); delete m_buffers.front().get(); - } } void BufferManager::register_buffer(Buffer& buffer) diff --git a/src/buffer_manager.hh b/src/buffer_manager.hh index 17388c92..014d241e 100644 --- a/src/buffer_manager.hh +++ b/src/buffer_manager.hh @@ -16,7 +16,6 @@ public: using BufferList = Vector>; using iterator = BufferList::const_iterator; - BufferManager(); ~BufferManager(); void register_buffer(Buffer& buffer); diff --git a/src/main.cc b/src/main.cc index b1c5a7df..1b6f38cb 100644 --- a/src/main.cc +++ b/src/main.cc @@ -463,8 +463,8 @@ int run_server(StringView session, StringView init_command, HighlighterRegistry highlighter_registry; DefinedHighlighters defined_highlighters; FaceRegistry face_registry; - ClientManager client_manager; BufferManager buffer_manager; + ClientManager client_manager; register_options(); register_env_vars(); @@ -590,8 +590,8 @@ int run_filter(StringView keystr, StringView commands, ConstArrayView