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

pull/245/head
Blaž Hrastnik 2021-06-15 01:01:58 +09:00
parent f33aaba53f
commit e819121f6e
1 changed files with 2 additions and 2 deletions

View File

@ -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);