diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index f03bbe8468904..16801a6fbb35d 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -1966,8 +1966,8 @@ impl ProjectPanel { } fn remove_from_project(&mut self, _: &RemoveFromProject, cx: &mut ViewContext) { - if let Some((worktree, _)) = self.selected_sub_entry(cx) { - let worktree_id = worktree.read(cx).id(); + for entry in self.marked_entries().iter() { + let worktree_id = entry.worktree_id; self.project .update(cx, |project, cx| project.remove_worktree(worktree_id, cx)); }