editor: Add Cut, Copy, and Paste actions to the context menu (#11878)
Hi, I saw someone on Twitter mentioned that missing Cut, Copy and Paste actions in the context menu in the editor block them from using Zed. It turns out that resolving this issue is simply a matter of adding these actions to the mouse context menu. To keep items in the context menu grouped, I placed them at the top of the menu with a separator at the end. Let me know if that's OK. Thanks! Here is the screenshot:  Release Notes: - Added "Cut", "Copy", and "Paste" actions to the context menu ([#4280](https://github.com/zed-industries/zed/issues/4280)).
This commit is contained in:
parent
8c681d0db3
commit
f2e7c635ac
1 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
use crate::{
|
||||
DisplayPoint, Editor, EditorMode, FindAllReferences, GoToDefinition, GoToImplementation,
|
||||
GoToTypeDefinition, Rename, RevealInFinder, SelectMode, ToggleCodeActions,
|
||||
Copy, Cut, DisplayPoint, Editor, EditorMode, FindAllReferences, GoToDefinition,
|
||||
GoToImplementation, GoToTypeDefinition, Paste, Rename, RevealInFinder, SelectMode,
|
||||
ToggleCodeActions,
|
||||
};
|
||||
use gpui::{DismissEvent, Pixels, Point, Subscription, View, ViewContext};
|
||||
use workspace::OpenInTerminal;
|
||||
|
@ -85,6 +86,10 @@ pub fn deploy_context_menu(
|
|||
}),
|
||||
)
|
||||
.separator()
|
||||
.action("Cut", Box::new(Cut))
|
||||
.action("Copy", Box::new(Copy))
|
||||
.action("Paste", Box::new(Paste))
|
||||
.separator()
|
||||
.action("Reveal in Finder", Box::new(RevealInFinder))
|
||||
.action("Open in Terminal", Box::new(OpenInTerminal));
|
||||
match focus {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue