From be94505e464d94c7672d7f97c45bf2ee2ba5d8f2 Mon Sep 17 00:00:00 2001 From: Delapouite Date: Mon, 20 Nov 2017 19:25:47 +0100 Subject: [PATCH] Add modified buffers count in error message of non-force quit --- src/commands.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands.cc b/src/commands.cc index 1b691ed1..1a8e8f73 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -387,7 +387,8 @@ static void ensure_all_buffers_are_saved() if (it == end) return; - String message = "modified buffers remaining: ["; + String message = format("{} modified buffers remaining: [", + std::count_if(it, end, is_modified)); while (it != end) { message += (*it)->name();