Skip to content

Commit

Permalink
project panel: support plural in RemoveFromProject
Browse files Browse the repository at this point in the history
This makes the `RemoveFromProject` action to remove all
marked entries in the project panel instead of just
the selected one.

Fixes #22454
  • Loading branch information
pepyakin committed Dec 27, 2024
1 parent 34f8bb2 commit db68fbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/project_panel/src/project_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1966,8 +1966,8 @@ impl ProjectPanel {
}

fn remove_from_project(&mut self, _: &RemoveFromProject, cx: &mut ViewContext<Self>) {
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));
}
Expand Down

0 comments on commit db68fbc

Please sign in to comment.