From 1da0af26c967a74310ab87edd5da471534a5582f Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Tue, 21 Aug 2018 17:27:17 +0300 Subject: [PATCH] src: Make sure buffers are saved regardless of the client count Due to a copy-paste mistake, the `:kill` command in a session with multiple clients was the equivalent of a force-kill (`:kill!`). This commit makes sure all buffers are saved before killing the session, unless the force flag is specified. --- src/commands.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands.cc b/src/commands.cc index 98cbdbad..a63bc71a 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -439,7 +439,7 @@ void kill(const ParametersParser& parser, Context& context, const ShellContext&) { auto& client_manager = ClientManager::instance(); - if (not force and client_manager.count() == 1) + if (not force) ensure_all_buffers_are_saved(); const int status = parser.positional_count() > 0 ? str_to_int(parser[0]) : 0;