From 4564273322dfbc34f20232474fe40c9988d84aaa Mon Sep 17 00:00:00 2001 From: "mgsloan@gmail.com" Date: Sun, 8 Dec 2024 21:21:16 -0700 Subject: [PATCH] Add comment explaining project panel behavior on right-click outside selection --- 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 7433d0599f..f30c4b91e2 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -3496,6 +3496,10 @@ impl ProjectPanel { // Stop propagation to prevent the catch-all context menu for the project // panel from being deployed. cx.stop_propagation(); + // Some context menu actions apply to all marked entries. If the user + // right-clicks on an entry that is not marked, they may not realize the + // action applies to multiple entries. To avoid inadvertent changes, all + // entries are unmarked. if !this.marked_entries.contains(&selection) { this.marked_entries.clear(); }