From f924c3ef00fc9540ae4b46a5013e01b7df39b889 Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 7 Nov 2024 11:03:55 -0800 Subject: [PATCH] Fix folder expand when dropped on itself in project_panel (#20365) Closes #13093 Release Notes: - Fixed folder expand when dropped on itself in project_panel --- crates/project_panel/src/project_panel.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index d17c668ee0..4892a21068 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -1703,6 +1703,10 @@ impl ProjectPanel { destination_is_file: bool, cx: &mut ViewContext, ) { + if entry_to_move == destination { + return; + } + let destination_worktree = self.project.update(cx, |project, cx| { let entry_path = project.path_for_entry(entry_to_move, cx)?; let destination_entry_path = project.path_for_entry(destination, cx)?.path.clone();