summaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands/typed.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index efe693b9..bc254146 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -518,8 +518,12 @@ fn write_quit(
}
write_impl(cx, args.first(), false)?;
- // TODO: change to use document close
- helix_lsp::block_on(cx.jobs.finish())?;
+ let doc = doc_mut!(cx.editor);
+
+ tokio::task::block_in_place(|| helix_lsp::block_on(doc.try_flush_saves()))
+ .map(|result| result.map(|_| ()))
+ .unwrap_or(Ok(()))?;
+
quit(cx, &[], event)
}