Skip to content

Commit 2a6e7c7

Browse files
Fix Incorrect Copy/Paste Menu Actions (#91)
### Description Fixes a typo where copy/paste menu items were incorrectly mapped to `undo`, causing their actions to trigger an undo instead of the intended action. ### Related Issues * closes CodeEditApp/CodeEdit#1996 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots In the example CETV app: https://github.com/user-attachments/assets/8f3b3358-fa45-4cc2-8646-6bf28abdf158
1 parent a5912e6 commit 2a6e7c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/CodeEditTextView/TextView/TextView+Menu.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ extension TextView {
1515

1616
menu.items = [
1717
NSMenuItem(title: "Cut", action: #selector(cut(_:)), keyEquivalent: "x"),
18-
NSMenuItem(title: "Copy", action: #selector(undo(_:)), keyEquivalent: "c"),
19-
NSMenuItem(title: "Paste", action: #selector(undo(_:)), keyEquivalent: "v")
18+
NSMenuItem(title: "Copy", action: #selector(copy(_:)), keyEquivalent: "c"),
19+
NSMenuItem(title: "Paste", action: #selector(paste(_:)), keyEquivalent: "v")
2020
]
2121

2222
return menu

0 commit comments

Comments
 (0)