From f82a551b98cec165ac91aae15ba656a811229fde Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Tue, 30 Aug 2022 23:08:15 -0400 Subject: Rename doc save event names to past tense --- helix-term/src/application.rs | 6 +++--- helix-term/src/job.rs | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'helix-term/src') diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 70eae18a..a06460de 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -9,7 +9,7 @@ use helix_core::{ use helix_lsp::{lsp, util::lsp_pos_to_pos, LspProgressMap}; use helix_view::{ align_view, - document::DocumentSaveEventResult, + document::DocumentSavedEventResult, editor::{ConfigEvent, EditorEvent}, theme, tree::Layout, @@ -431,7 +431,7 @@ impl Application { } } - pub fn handle_document_write(&mut self, doc_save_event: DocumentSaveEventResult) { + pub fn handle_document_write(&mut self, doc_save_event: DocumentSavedEventResult) { if let Err(err) = doc_save_event { self.editor.set_error(err.to_string()); return; @@ -485,7 +485,7 @@ impl Application { log::debug!("received editor event: {:?}", event); match event { - EditorEvent::DocumentSave(event) => { + EditorEvent::DocumentSaved(event) => { self.handle_document_write(event); self.render(); } diff --git a/helix-term/src/job.rs b/helix-term/src/job.rs index a997653d..3c9e4511 100644 --- a/helix-term/src/job.rs +++ b/helix-term/src/job.rs @@ -107,6 +107,7 @@ impl Jobs { ) -> anyhow::Result<()> { log::debug!("waiting on jobs..."); let mut wait_futures = std::mem::take(&mut self.wait_futures); + while let (Some(job), tail) = wait_futures.into_future().await { match job { Ok(callback) => { -- cgit v1.2.3-70-g09d2