diff options
author | Blaž Hrastnik | 2021-06-14 16:01:58 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-14 16:02:32 +0000 |
commit | e819121f6e3a462b57e728fe5156783e1a8a3035 (patch) | |
tree | 081ed6919f7919c0b9e08124b090c0f7cd22e8d8 /helix-term | |
parent | f33aaba53fee32fb0a6e496c472f4e08bb401237 (diff) |
fix: wq/wqa functions need to wait for save to finish before closing
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/commands.rs | 4 |
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); |