Release display buffers when a window is added to free list
This commit is contained in:
parent
92cb3a035f
commit
b697bf1795
|
@ -98,6 +98,7 @@ WindowAndSelections ClientManager::get_free_window(Buffer& buffer)
|
|||
|
||||
void ClientManager::add_free_window(std::unique_ptr<Window>&& window, SelectionList selections)
|
||||
{
|
||||
window->clear_display_buffer();
|
||||
Buffer& buffer = window->buffer();
|
||||
m_free_windows.push_back({ std::move(window), SelectionList{ std::move(selections) }, buffer.timestamp() });
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ public:
|
|||
|
||||
ByteCoord offset_coord(ByteCoord coord, CharCount offset);
|
||||
ByteCoordAndTarget offset_coord(ByteCoordAndTarget coord, LineCount offset);
|
||||
|
||||
void clear_display_buffer() { m_display_buffer = DisplayBuffer{}; }
|
||||
private:
|
||||
Window(const Window&) = delete;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user