feat(macOS): Paste copied files as absolute paths.

Previously files would be pasted as only the filename. This commit
introduces an extension to NSPasteboard which provides a method to
consistently get the string contents of a pasteboard so that the
behavior can stay the same anywhere where we need to do that.
This commit is contained in:
Qwerasd
2024-03-07 20:53:48 -05:00
parent b3e411add8
commit d1ac0aff39
4 changed files with 25 additions and 2 deletions

View File

@@ -382,7 +382,7 @@ extension Ghostty {
}
// Get our string
let str = NSPasteboard.general.string(forType: .string) ?? ""
let str = NSPasteboard.general.getOpinionatedStringContents() ?? ""
completeClipboardRequest(surface, data: str, state: state)
}