aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-10-21 04:28:29 +0000
committerGitHub2022-10-21 04:28:29 +0000
commitf486f34ebe0e21f0e109e24037e73182b2cf510a (patch)
tree4aaf5b05d037b05a9a0b3be6eb7d6634eec98d12 /helix-term/src
parent74a6a2282e79190baa59cd52907e014b31331819 (diff)
flush writes on force quit (#4397)
When force quitting, we need to block on the pending writes to ensure that write commands succeed before exiting, and also to avoid a crash when all the views are gone before the auto format call returns from the LS.
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands/typed.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index f154fd38..394c0733 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -51,6 +51,7 @@ fn force_quit(
ensure!(args.is_empty(), ":quit! takes no arguments");
+ cx.block_try_flush_writes()?;
cx.editor.close(view!(cx.editor).id);
Ok(())