Send buffer operations via the Project instead of Worktree

This commit is contained in:
Antonio Scandurra 2022-03-08 11:11:25 +01:00
parent b49951ac57
commit d6c8fdb3c4
5 changed files with 101 additions and 112 deletions

View file

@ -1034,6 +1034,7 @@ mod tests {
use project::{
fs::{FakeFs, Fs as _},
search::SearchQuery,
worktree::WorktreeHandle,
DiagnosticSummary, Project, ProjectPath,
};
use rand::prelude::*;
@ -1411,6 +1412,8 @@ mod tests {
buffer_b.read_with(cx_b, |buf, _| assert!(!buf.is_dirty()));
buffer_c.condition(cx_c, |buf, _| !buf.is_dirty()).await;
worktree_a.flush_fs_events(cx_a).await;
// Make changes on host's file system, see those changes on guest worktrees.
fs.rename(
"/a/file1".as_ref(),