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 <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2021-08-19 12:17:32 -07:00
parent 6288ac2e21
commit 266867b516

View file

@ -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,