@@ -1,5 +1,5 @@
11use arc_swap::{access::Map, ArcSwap};
2−use futures_util::{Stream, StreamExt};
2+use futures_util::Stream;
33use helix_core::{
44 diagnostic::{DiagnosticTag, NumberOrString},
55 path::get_relative_path,
@@ -969,22 +969,7 @@ impl Application {
969969 let mut errs = Vec::new();
970970
971971 // TODO: deduplicate with ctx.block_try_flush_writes
972− tokio::task::block_in_place(|| {
973− helix_lsp::block_on(async {
974− while let Some(save_event) = self.editor.save_queue.next().await {
975− match &save_event {
976− Ok(event) => {
977− let doc = doc_mut!(self.editor, &event.doc_id);
978− doc.set_last_saved_revision(event.revision);
979− }
980− Err(err) => {
981− log::error!("error saving document: {}", err);
982− }
983− };
984− // TODO: if is_err: break?
985− }
986− })
987− });
972+ tokio::task::block_in_place(|| helix_lsp::block_on(self.editor.flush_writes()));
988973
989974 if let Err(err) = self
990975 .jobs