mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Preserve full URL when pasting from clipboard
This commit is contained in:
@ -15,7 +15,9 @@ extension NSPasteboard {
|
|||||||
func getOpinionatedStringContents() -> String? {
|
func getOpinionatedStringContents() -> String? {
|
||||||
if let urls = readObjects(forClasses: [NSURL.self]) as? [URL],
|
if let urls = readObjects(forClasses: [NSURL.self]) as? [URL],
|
||||||
urls.count > 0 {
|
urls.count > 0 {
|
||||||
return urls.map { $0.path }.joined(separator: " ")
|
return urls
|
||||||
|
.map { $0.isFileURL ? $0.path : $0.absoluteString }
|
||||||
|
.joined(separator: " ")
|
||||||
}
|
}
|
||||||
|
|
||||||
return self.string(forType: .string)
|
return self.string(forType: .string)
|
||||||
|
Reference in New Issue
Block a user