diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-11-22 14:08:55 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-11-22 14:08:55 +0100 |
| commit | 08ad8e8a40ad189271ecea84ad31bd9ea4d9a5e6 (patch) | |
| tree | 72765cbbb6e45262c1cae83a1c77d037b6055808 /src/buffer.cc | |
| parent | 3b5530ac09bc688f39cd4cd3c4845d8750664ce9 (diff) | |
move Window ownership to the ClientManager instead of the Buffer
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index 937cd6bc..0fc1709b 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -43,7 +43,6 @@ Buffer::~Buffer() { m_hooks.run_hook("BufClose", m_name, Context(Editor(*this))); - m_windows.clear(); BufferManager::instance().unregister_buffer(*this); assert(m_change_listeners.empty()); } @@ -388,20 +387,6 @@ void Buffer::erase(BufferIterator begin, BufferIterator end) do_erase(begin, end); } -Window& Buffer::new_window() -{ - m_windows.emplace_back(new Window(*this)); - return *m_windows.back(); -} - -void Buffer::delete_window(Window& window) -{ - assert(&window.buffer() == this); - auto window_it = std::find(m_windows.begin(), m_windows.end(), &window); - assert(window_it != m_windows.end()); - m_windows.erase(window_it); -} - bool Buffer::is_modified() const { size_t history_cursor_index = m_history_cursor - m_history.begin(); |
