From 266867b516e70bba225987dd3a17081f8daa9c84 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 19 Aug 2021 12:17:32 -0700 Subject: [PATCH] Send SaveBuffer message on foreground thread This ensures that it gets sent *after* any other messages for which we have already spawned a foreground send. Co-Authored-By: Nathan Sobo --- zed/src/worktree.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zed/src/worktree.rs b/zed/src/worktree.rs index d24c1b412eb8596dd30088a21f8eb2b1d5b497df..723487ad4ae00640bddb032520374a3668199653 100644 --- a/zed/src/worktree.rs +++ b/zed/src/worktree.rs @@ -1639,7 +1639,7 @@ impl File { Worktree::Remote(worktree) => { let rpc = worktree.rpc.clone(); let worktree_id = worktree.remote_id; - cx.background().spawn(async move { + cx.foreground().spawn(async move { let response = rpc .request(proto::SaveBuffer { worktree_id,