mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-05 19:08:17 +00:00
macos: show the copy menu item if we have any text selected
This commit is contained in:
@@ -1327,7 +1327,7 @@ extension Ghostty {
|
||||
var item: NSMenuItem
|
||||
|
||||
// If we have a selection, add copy
|
||||
if self.selectedRange().length > 0 {
|
||||
if let text = self.accessibilitySelectedText(), text.count > 0 {
|
||||
menu.addItem(withTitle: "Copy", action: #selector(copy(_:)), keyEquivalent: "")
|
||||
}
|
||||
menu.addItem(withTitle: "Paste", action: #selector(paste(_:)), keyEquivalent: "")
|
||||
|
Reference in New Issue
Block a user