on master help sign in
fix: wq/wqa functions need to wait for save to finish before closing
e819121Blaž Hrastnik
helix-term/src/commands.rs+2−2
@@ -958,7 +958,7 @@ mod cmd {
958 if autofmt {
958 if autofmt {
959 doc.format(view.id); // TODO: merge into save
959 doc.format(view.id); // TODO: merge into save
960 }
960 }
961− tokio::spawn(doc.save());
961+ helix_lsp::block_on(doc.save());
962 Ok(())
962 Ok(())
963 }
963 }
964
964
@@ -1051,7 +1051,7 @@ mod cmd {
1051 errors.push_str("cannot write a buffer without a filename\n");
1051 errors.push_str("cannot write a buffer without a filename\n");
1052 continue;
1052 continue;
1053 }
1053 }
1054− tokio::spawn(doc.save());
1054+ helix_lsp::block_on(doc.save());
1055 }
1055 }
1056 editor.set_error(errors);
1056 editor.set_error(errors);
1057
1057