# git_ui: Add clipboard context menu to commit message editor \(\#64142\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/bf921d03b88df7cecb7b693690ce5862be6f5785)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: bf921d03b88df7cecb7b693690ce5862be6f5785

Requested commit: bf921d03b88df7cecb7b693690ce5862be6f5785

Commit: bf921d03b88df7cecb7b693690ce5862be6f5785

Tree: 151af58c243dc3a24bd72f8bb7a03f487bc87484

Author: hooch

Committer: GitHub

## Message

```
git_ui: Add clipboard context menu to commit message editor (#64142)

# Objective

- Enable users to cut, copy, and paste commit-message text through a
right-click menu in the Git sidebar and expanded commit modal.

## Solution

- Add a context menu to the shared commit-message editor using Zed’s
existing clipboard actions
- Disable Cut and Copy when no text is selected, and route actions to
the editor’s focus handle.

## Testing

- Added a regression test covering clipboard behaviour in both editor
modes.
- Reviewer can test by using right-click context menu in the git commit
message panel to cut/copy/paste
- Tested on Mac OS with `cargo run`

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] ~~Unsafe blocks (if any) have justifying comments~~
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

<img width="800" height="451" alt="commit-menu"
src="https://github.com/user-attachments/assets/1ba281d7-7651-4408-8c10-ee456cde2e1d"
/>

---

Release Notes:

- Added Cut, Copy, and Paste context menu actions to the commit message
editor.
```

## Parents

- [250b6581b5b346855cccfb909839d47711cf910b](https://git.cafe/gitcafe/zed/commit/250b6581b5b346855cccfb909839d47711cf910b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/bf921d03b88df7cecb7b693690ce5862be6f5785?format=markdown)
