From d9a5dc2dfe9e8989dd79440a905e909c6ee94b8d Mon Sep 17 00:00:00 2001 From: CharlesChen0823 Date: Mon, 26 May 2025 21:45:19 +0800 Subject: [PATCH] windows: Using `ctrl+drag` to copy in windows platform (#31433) Closes #31328 > There should be other places in Zed that were supposed to handle mouse modifiers differently based on the platform, might worth checking for them. reference [comments](https://github.com/zed-industries/zed/pull/29921#issuecomment-2908922764) Release Notes: - N/A --- crates/project_panel/src/project_panel.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index 9b8992fc6c..ccdf00b3d4 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -3104,7 +3104,8 @@ impl ProjectPanel { window: &mut Window, cx: &mut Context, ) { - let should_copy = window.modifiers().alt; + let should_copy = cfg!(target_os = "macos") && window.modifiers().alt + || cfg!(not(target_os = "macos")) && window.modifiers().control; if should_copy { let _ = maybe!({ let project = self.project.read(cx);