diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-03-23 07:36:18 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-03-23 07:36:18 +1100 |
| commit | db7b43acd5f30186b9a46a0032bca03c40366d7d (patch) | |
| tree | 2104d26892a9c915f5f5d07129b6f164ea98c6bd /src/client_manager.cc | |
| parent | 796fbc6c1fbc1d94d02c314429cad7f954526713 (diff) | |
Restore client name after converting to client
When Kakoune forked the sever to background, the newly converted
to client process (the original client/server process) was not
preserving its previous client name.
Diffstat (limited to 'src/client_manager.cc')
| -rw-r--r-- | src/client_manager.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client_manager.cc b/src/client_manager.cc index 9cb5f8e5..ad9a5009 100644 --- a/src/client_manager.cc +++ b/src/client_manager.cc @@ -39,7 +39,7 @@ String ClientManager::generate_name() const } Client* ClientManager::create_client(std::unique_ptr<UserInterface>&& ui, int pid, - EnvVarMap env_vars, StringView init_cmds, + String name, EnvVarMap env_vars, StringView init_cmds, Optional<BufferCoord> init_coord, Client::OnExitCallback on_exit) { @@ -47,7 +47,8 @@ Client* ClientManager::create_client(std::unique_ptr<UserInterface>&& ui, int pi WindowAndSelections ws = get_free_window(buffer); Client* client = new Client{std::move(ui), std::move(ws.window), std::move(ws.selections), pid, - std::move(env_vars), generate_name(), + std::move(env_vars), + name.empty() ? generate_name() : std::move(name), std::move(on_exit)}; m_clients.emplace_back(client); |
