diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-04-12 09:02:59 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-04-12 13:23:38 +1000 |
| commit | ef1fd3acb95a58900d73a194ce8339b5301dfd0b (patch) | |
| tree | aeeb86a5c33a4985943cad6dd7686a49a967f74c /src/client_manager.cc | |
| parent | f732ea4efb13ced7055a7cc82d30c6cff0a558d3 (diff) | |
Prevent conversion to client on suspend from disconnecting other clients
clear the client manager in the to be converted process without
sending exit messages as the forked server will still be there.
Fixes #2847
Diffstat (limited to 'src/client_manager.cc')
| -rw-r--r-- | src/client_manager.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/client_manager.cc b/src/client_manager.cc index 9dd32df5..ca32678f 100644 --- a/src/client_manager.cc +++ b/src/client_manager.cc @@ -14,13 +14,18 @@ namespace Kakoune ClientManager::ClientManager() = default; ClientManager::~ClientManager() { - clear(); + clear(true); } -void ClientManager::clear() +void ClientManager::clear(bool disconnect_clients) { - while (not m_clients.empty()) - remove_client(*m_clients.front(), true, 0); + if (disconnect_clients) + { + while (not m_clients.empty()) + remove_client(*m_clients.front(), true, 0); + } + else + m_clients.clear(); m_client_trash.clear(); for (auto& window : m_free_windows) |
