macos: support dropping file urls onto surfaces

This commit is contained in:
Mitchell Hashimoto
2023-10-04 08:01:13 -07:00
parent ee832aa361
commit 2aacf6e130

View File

@ -133,7 +133,12 @@ extension Ghostty {
providers.forEach { provider in providers.forEach { provider in
_ = provider.loadObject(ofClass: URL.self) { url, _ in _ = provider.loadObject(ofClass: URL.self) { url, _ in
guard let url = url else { return } guard let url = url else { return }
AppDelegate.logger.warning("OPEN url=\(url.path)") DispatchQueue.main.async {
surfaceView.insertText(
url.path,
replacementRange: NSMakeRange(0, 0)
)
}
} }
} }