diff options
author | Skyler Hawthorne | 2022-04-23 22:38:55 +0000 |
---|---|---|
committer | Skyler Hawthorne | 2022-10-19 02:31:38 +0000 |
commit | a5a93182cd5ccf88bc95b68044aa05d746ded35e (patch) | |
tree | 14e7d73c9f0b4f0c969f487165c56ab4402fbebd /helix-term | |
parent | d706194597d462fbaeb1ef55e2e8fb6eae38d2f3 (diff) |
fix: buffer-close ensuring writes
Make sure buffer-close waits for the document to finish its writes.
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/application.rs | 2 | ||||
-rw-r--r-- | helix-term/src/commands/typed.rs | 1 | ||||
-rw-r--r-- | helix-term/tests/test/commands.rs | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index a9e25d08..2c1047da 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -310,6 +310,8 @@ impl Application { self.render(); } event = self.editor.wait_event() => { + log::debug!("received editor event: {:?}", event); + match event { EditorEvent::DocumentSave(event) => { self.handle_document_write(event); diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index d82dd7fe..375e7b4f 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -151,6 +151,7 @@ fn buffer_close( } let document_ids = buffer_gather_paths_impl(cx.editor, args); + log::debug!("closing buffers: {:?}", document_ids); buffer_close_by_ids_impl(cx.editor, &document_ids, false) } diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs index f7ce9af0..8aea144b 100644 --- a/helix-term/tests/test/commands.rs +++ b/helix-term/tests/test/commands.rs @@ -26,7 +26,6 @@ async fn test_write_quit_fail() -> anyhow::Result<()> { } #[tokio::test] -#[ignore] async fn test_buffer_close_concurrent() -> anyhow::Result<()> { test_key_sequences( &mut Application::new(Args::default(), Config::default())?, |