aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-06-14 16:01:58 +0000
committerBlaž Hrastnik2021-06-14 16:02:32 +0000
commite819121f6e3a462b57e728fe5156783e1a8a3035 (patch)
tree081ed6919f7919c0b9e08124b090c0f7cd22e8d8
parentf33aaba53fee32fb0a6e496c472f4e08bb401237 (diff)
fix: wq/wqa functions need to wait for save to finish before closing
-rw-r--r--helix-term/src/commands.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 09048f48..b5f37563 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -958,7 +958,7 @@ mod cmd {
if autofmt {
doc.format(view.id); // TODO: merge into save
}
- tokio::spawn(doc.save());
+ helix_lsp::block_on(doc.save());
Ok(())
}
@@ -1051,7 +1051,7 @@ mod cmd {
errors.push_str("cannot write a buffer without a filename\n");
continue;
}
- tokio::spawn(doc.save());
+ helix_lsp::block_on(doc.save());
}
editor.set_error(errors);