@@ -977,18 +977,7 @@ impl Application {
977977 errs.push(err);
978978 };
979979
980− for doc in self.editor.documents_mut() {
981− if let Some(Err(err)) = doc.close().await {
982− if let Some(path) = doc.path() {
983− log::error!(
984− "Error saving document '{}': {}",
985− path.to_string_lossy(),
986− err
987− );
988− }
989− errs.push(err);
990− }
991− }
980+ self.editor.flush_writes().await;
992981
993982 if self.editor.close_language_servers(None).await.is_err() {
994983 log::error!("Timed out waiting for language servers to shutdown");