From 835f2239a7428d3457e277c95ad39e2cdd5211d5 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 4 Apr 2019 22:05:44 +1100 Subject: [PATCH] Run WinClose hook when clearing all free windows Fixes #2830 --- src/client_manager.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client_manager.cc b/src/client_manager.cc index 63a9201e..943d7963 100644 --- a/src/client_manager.cc +++ b/src/client_manager.cc @@ -24,6 +24,9 @@ void ClientManager::clear() ClientList clients = std::move(m_clients); clients.clear(); m_client_trash.clear(); + for (auto& window : m_free_windows) + window.window->run_hook_in_own_context(Hook::WinClose, + window.window->buffer().name()); m_free_windows.clear(); m_window_trash.clear(); }