diff options
| author | Maxime Coste <mawww@kakoune.org> | 2020-10-19 20:39:25 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2020-10-19 20:39:25 +1100 |
| commit | 2cd323b314e9f2b2cdf11bbf2974e9390914d5ea (patch) | |
| tree | cf698d814f131d9e9e5de22186c8671a6a0fe27d /src/commands.cc | |
| parent | 97e88b60878133bea4b2c3920e5176da97483c12 (diff) | |
Allow quiting last client with unsaved buffer in daemon mode
Because the server will out-live that client's disconnection it
is still ok to have modified buffers, the server will complain
on `kill`.
Fixes #3801
Diffstat (limited to 'src/commands.cc')
| -rw-r--r-- | src/commands.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commands.cc b/src/commands.cc index 745a8201..e453fbf2 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -623,7 +623,7 @@ const CommandDesc force_kill_cmd = { template<bool force> void quit(const ParametersParser& parser, Context& context, const ShellContext&) { - if (not force and ClientManager::instance().count() == 1) + if (not force and ClientManager::instance().count() == 1 and not Server::instance().is_daemon()) ensure_all_buffers_are_saved(); const int status = parser.positional_count() > 0 ? str_to_int(parser[0]) : 0; |
