on master help sign in
fix: wq/wqa functions need to wait for save to finish before closing
commite819121f6e3a462b57e728fe5156783e1a8a3035 authorBlaž Hrastnik <blaz@mxxn.io> dateTue 15 Jun 2021, 01:01 (5 years ago) parentf33aaba
1 file changed+2−2
helix-term/src/commands.rs+2−2
helix-term/src/commands.rs+2−2
@@ -958,7 +958,7 @@ mod cmd {
958958 if autofmt {
959959 doc.format(view.id); // TODO: merge into save
960960 }
961− tokio::spawn(doc.save());
961+ helix_lsp::block_on(doc.save());
962962 Ok(())
963963 }
964964
@@ -1051,7 +1051,7 @@ mod cmd {
10511051 errors.push_str("cannot write a buffer without a filename\n");
10521052 continue;
10531053 }
1054− tokio::spawn(doc.save());
1054+ helix_lsp::block_on(doc.save());
10551055 }
10561056 editor.set_error(errors);
10571057