From f486f34ebe0e21f0e109e24037e73182b2cf510a Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Fri, 21 Oct 2022 00:28:29 -0400 Subject: 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.--- helix-term/src/commands/typed.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'helix-term/src/commands') 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(()) -- cgit v1.2.3-70-g09d2