summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDelapouite <delapouite@gmail.com>2017-11-20 19:25:47 +0100
committerDelapouite <delapouite@gmail.com>2017-11-20 19:25:47 +0100
commitbe94505e464d94c7672d7f97c45bf2ee2ba5d8f2 (patch)
treefdf7cf1b2a2371162daef052a58c8a5f43c1ce6f /src
parent079b006cdab6f0ae594f80fff18ad61b71b0754d (diff)
Add modified buffers count in error message of non-force quit
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc3
1 files changed, 2 insertions, 1 deletions
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();