Skip to content

terminal: Enable copy and paste in edit menu - #58111

Merged
dinocosta merged 2 commits into
zed-industries:mainfrom
terror:terminal-copy-paste-macos
Jun 1, 2026
Merged

terminal: Enable copy and paste in edit menu#58111
dinocosta merged 2 commits into
zed-industries:mainfrom
terror:terminal-copy-paste-macos

Conversation

@terror

@terror terror commented May 30, 2026

Copy link
Copy Markdown
Contributor

Resolves #57999

This diff fixes the macOS Edit menu showing Copy and Paste as disabled when a terminal is focused. Terminal shortcuts already worked because keybindings dispatch terminal::Copy and terminal::Paste, but the app menu validates editor::Copy and editor::Paste, which the terminal view did not expose.

With this change, the terminal view handles the editor Copy and Paste actions by delegating to the existing terminal copy and paste paths. This keeps keyboard behavior unchanged while allowing menu validation and menu dispatch to work correctly for focused terminals.

Release Notes:

  • Fixed Copy and Paste being disabled in the macOS Edit menu when a terminal is focused.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 30, 2026

@dinocosta dinocosta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @terror ! 🙂

I've pushed a smaller commit just renaming the method and adding documentation so future developers can understand why we also have these here.

@dinocosta
dinocosta added this pull request to the merge queue Jun 1, 2026
Merged via the queue into zed-industries:main with commit 86e195b Jun 1, 2026
33 checks passed
@dinocosta dinocosta added the area:integrations/terminal Feedback for terminal integration, shell commands, etc label Jun 1, 2026
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 2, 2026
Resolves zed-industries#57999

This diff fixes the macOS Edit menu showing Copy and Paste as disabled
when a terminal is focused. Terminal shortcuts already worked because
keybindings dispatch `terminal::Copy` and `terminal::Paste`, but the app
menu validates `editor::Copy` and `editor::Paste`, which the terminal
view did not expose.

With this change, the terminal view handles the editor Copy and Paste
actions by delegating to the existing terminal copy and paste paths.
This keeps keyboard behavior unchanged while allowing menu validation
and menu dispatch to work correctly for focused terminals.

Release Notes:
- Fixed `Copy` and `Paste` being disabled in the macOS `Edit` menu when
a terminal is focused.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
Resolves zed-industries#57999

This diff fixes the macOS Edit menu showing Copy and Paste as disabled
when a terminal is focused. Terminal shortcuts already worked because
keybindings dispatch `terminal::Copy` and `terminal::Paste`, but the app
menu validates `editor::Copy` and `editor::Paste`, which the terminal
view did not expose.

With this change, the terminal view handles the editor Copy and Paste
actions by delegating to the existing terminal copy and paste paths.
This keeps keyboard behavior unchanged while allowing menu validation
and menu dispatch to work correctly for focused terminals.

Release Notes:
- Fixed `Copy` and `Paste` being disabled in the macOS `Edit` menu when
a terminal is focused.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:integrations/terminal Feedback for terminal integration, shell commands, etc cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy / Paste menu items are disabled when terminal is focused

2 participants