Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Nathan Sobo
2021-04-23 12:47:23 -06:00
co-authored by Max Brunsfeld
parent c9d7249305
commit dced9469f5
4 changed files with 113 additions and 80 deletions
+2 -2
View File
@@ -114,7 +114,7 @@ impl Workspace {
pub fn contains_path(&self, path: &Path, app: &AppContext) -> bool {
self.worktrees
.iter()
.any(|worktree| worktree.read(app).contains_path(path))
.any(|worktree| worktree.read(app).contains_abs_path(path))
}
pub fn open_paths(&mut self, paths: &[PathBuf], ctx: &mut ModelContext<Self>) {
@@ -125,7 +125,7 @@ impl Workspace {
pub fn open_path<'a>(&'a mut self, path: PathBuf, ctx: &mut ModelContext<Self>) {
for tree in self.worktrees.iter() {
if tree.read(ctx).contains_path(&path) {
if tree.read(ctx).contains_abs_path(&path) {
return;
}
}