Skip to content

Commit 8f29c91

Browse files
committed
flush writes on force quit
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.
1 parent fbf8078 commit 8f29c91

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

helix-term/src/commands/typed.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ fn force_quit(
5151

5252
ensure!(args.is_empty(), ":quit! takes no arguments");
5353

54+
cx.block_try_flush_writes()?;
5455
cx.editor.close(view!(cx.editor).id);
5556

5657
Ok(())

0 commit comments

Comments
 (0)