aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/compositor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r--helix-term/src/compositor.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index a4ffaff2..76703780 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -1,4 +1,3 @@
-use futures_util::StreamExt;
// Each component declares it's own size constraints and gets fitted based on it's parent.
// Q: how does this work with popups?
// cursive does compositor.screen_mut().add_layer_at(pos::absolute(x, y), <component>)
@@ -34,22 +33,7 @@ impl<'a> Context<'a> {
pub fn block_try_flush_writes(&mut self) -> anyhow::Result<()> {
tokio::task::block_in_place(|| helix_lsp::block_on(self.jobs.finish(self.editor, None)))?;
- tokio::task::block_in_place(|| {
- helix_lsp::block_on(async {
- while let Some(save_event) = self.editor.save_queue.next().await {
- match &save_event {
- Ok(event) => {
- let doc = doc_mut!(self.editor, &event.doc_id);
- doc.set_last_saved_revision(event.revision);
- }
- Err(err) => {
- log::error!("error saving document: {}", err);
- }
- };
- // TODO: if is_err: break?
- }
- })
- });
+ tokio::task::block_in_place(|| helix_lsp::block_on(self.editor.flush_writes()));
Ok(())
}