@@ -2090,6 +2090,7 @@ pub mod cmd {
2090 return Ok(());
2090 return Ok(());
2093+ let mut nonexistent_buffers = vec![];
2093 for arg in args {
2094 for arg in args {
2094 let doc_id = editor.documents().find_map(|doc| {
2095 let doc_id = editor.documents().find_map(|doc| {
2095 let arg_path = Some(Path::new(arg.as_ref()));
2096 let arg_path = Some(Path::new(arg.as_ref()));
@@ -2104,12 +2105,19 @@ pub mod cmd {
2105 match doc_id {
2106 match doc_id {
2106 Some(doc_id) => editor.close_document(doc_id, force)?,
2107 Some(doc_id) => editor.close_document(doc_id, force)?,
2107− None => {
2108+ None => nonexistent_buffers.push(arg),
2108− editor.set_error(format!("couldn't close buffer '{}': does not exist", arg));
2112+ let nonexistent_buffers: Vec<_> = nonexistent_buffers
2114+ .map(|str| format!("'{}'", str))
2116+ editor.set_error(format!(
2117+ "couldn't close buffer(s) {}: does not exist",
2118+ nonexistent_buffers.join(", ")