From 125b1924ce75493b47e408fc79e89a5c6d260e64 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 18 Jun 2019 21:49:41 +1000 Subject: [PATCH] Move dropped free windoes to the window trash --- src/client_manager.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client_manager.cc b/src/client_manager.cc index b1d6c6f21..b95e80ece 100644 --- a/src/client_manager.cc +++ b/src/client_manager.cc @@ -155,7 +155,10 @@ WindowAndSelections ClientManager::get_free_window(Buffer& buffer) void ClientManager::add_free_window(std::unique_ptr&& window, SelectionList selections) { if (not contains(BufferManager::instance(), &window->buffer())) + { + m_window_trash.push_back(std::move(window)); return; + } window->clear_display_buffer(); m_free_windows.push_back({std::move(window), std::move(selections)});