summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client_manager.cc1
-rw-r--r--src/window.hh2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/client_manager.cc b/src/client_manager.cc
index 00999113..f1da3159 100644
--- a/src/client_manager.cc
+++ b/src/client_manager.cc
@@ -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() });
}
diff --git a/src/window.hh b/src/window.hh
index 978fb374..aaeb34a6 100644
--- a/src/window.hh
+++ b/src/window.hh
@@ -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;