From fca0609ed3f9fb089eb319eb7e16a75633aff42f Mon Sep 17 00:00:00 2001 From: ANKDDEV Date: Thu, 19 Dec 2024 06:40:48 +0300 Subject: [PATCH] chore: remove commands for copying file name from tab's menu --- crates/workspace/src/pane.rs | 28 +--------------------------- crates/workspace/src/workspace.rs | 2 -- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 6fed08df1068a3..01a6d3392a511b 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -7,7 +7,7 @@ use crate::{ notifications::NotifyResultExt, toolbar::Toolbar, workspace_settings::{AutosaveSetting, TabBarSettings, WorkspaceSettings}, - CloseWindow, CopyPath, CopyRelativePath, CopyFileName, CopyFileNameWithoutExtension, NewFile, NewTerminal, OpenInTerminal, OpenTerminal, + CloseWindow, CopyPath, CopyRelativePath, NewFile, NewTerminal, OpenInTerminal, OpenTerminal, OpenVisible, SplitDirection, ToggleFileFinder, ToggleProjectSymbols, ToggleZoom, Workspace, }; use anyhow::Result; @@ -2357,32 +2357,6 @@ impl Pane { }), ) }) - .when_some(relative_path.clone(), |menu, relative_path| { - menu.entry( - "Copy File Name", - Some(Box::new(CopyFileName)), - cx.handler_for(&pane, move |_, cx| { - if let Some(name) = relative_path.file_stem() { - cx.write_to_clipboard(ClipboardItem::new_string( - name.to_string_lossy().to_string(), - )); - } - }), - ) - }) - .when_some(relative_path.clone(), |menu, relative_path| { - menu.entry( - "Copy File Name without Extension", - Some(Box::new(CopyFileNameWithoutExtension)), - cx.handler_for(&pane, move |_, cx| { - if let Some(name) = relative_path.file_name() { - cx.write_to_clipboard(ClipboardItem::new_string( - name.to_string_lossy().to_string(), - )); - } - }), - ) - }) .map(pin_tab_entries) .separator() .entry( diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index f9df9060269d28..be7c13d5931846 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -135,8 +135,6 @@ actions!( CloseWindow, CopyPath, CopyRelativePath, - CopyFileName, - CopyFileNameWithoutExtension, Feedback, FollowNextCollaborator, NewCenterTerminal,