Run WinClose hook when clearing all free windows

Fixes #2830
This commit is contained in:
Maxime Coste 2019-04-04 22:05:44 +11:00
parent cc788c888e
commit 835f2239a7

View File

@ -24,6 +24,9 @@ void ClientManager::clear()
ClientList clients = std::move(m_clients); ClientList clients = std::move(m_clients);
clients.clear(); clients.clear();
m_client_trash.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_free_windows.clear();
m_window_trash.clear(); m_window_trash.clear();
} }