fix: wq/wqa functions need to wait for save to finish before closing

imgbot
Blaž Hrastnik 3 years ago
parent f33aaba53f
commit e819121f6e

@ -958,7 +958,7 @@ mod cmd {
if autofmt { if autofmt {
doc.format(view.id); // TODO: merge into save doc.format(view.id); // TODO: merge into save
} }
tokio::spawn(doc.save()); helix_lsp::block_on(doc.save());
Ok(()) Ok(())
} }
@ -1051,7 +1051,7 @@ mod cmd {
errors.push_str("cannot write a buffer without a filename\n"); errors.push_str("cannot write a buffer without a filename\n");
continue; continue;
} }
tokio::spawn(doc.save()); helix_lsp::block_on(doc.save());
} }
editor.set_error(errors); editor.set_error(errors);

Loading…
Cancel
Save