aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-05-10 03:08:12 +0000
committerSkyler Hawthorne2022-10-19 02:31:38 +0000
commite1f7bdb1d2ef68c0de38e768080291901ff4662e (patch)
tree8364a4965296f762e338f3803d8e99252eb62ae4 /helix-term/src/commands
parent83b6042b97d13fca751e3d5d0c32f04e3ad04c9a (diff)
fix buffer-close
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/typed.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 35c84601..efe693b9 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -77,9 +77,9 @@ fn buffer_close_by_ids_impl(
let (modified_ids, modified_names): (Vec<_>, Vec<_>) = doc_ids
.iter()
.filter_map(|&doc_id| {
- if let Err(CloseError::BufferModified(name)) =
+ if let Err(CloseError::BufferModified(name)) = tokio::task::block_in_place(|| {
helix_lsp::block_on(editor.close_document(doc_id, force))
- {
+ }) {
Some((doc_id, name))
} else {
None
@@ -151,7 +151,6 @@ 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)
}
@@ -519,6 +518,7 @@ fn write_quit(
}
write_impl(cx, args.first(), false)?;
+ // TODO: change to use document close
helix_lsp::block_on(cx.jobs.finish())?;
quit(cx, &[], event)
}