From 6021ddf39e6fb06ce6a86a163e7d7f35247e8158 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Fri, 8 Nov 2024 16:42:40 +0100 Subject: [PATCH] Fix "Copy URL" for pasting into Terminal, closes #2853 --- rel/app/macos/Sources/Livebook/Livebook.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rel/app/macos/Sources/Livebook/Livebook.swift b/rel/app/macos/Sources/Livebook/Livebook.swift index 4f347685bc8a..f516bcdff5c9 100644 --- a/rel/app/macos/Sources/Livebook/Livebook.swift +++ b/rel/app/macos/Sources/Livebook/Livebook.swift @@ -128,7 +128,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { func copyURL() { let pasteboard = NSPasteboard.general pasteboard.clearContents() - pasteboard.setData(url!.data(using: .utf8), forType: NSPasteboard.PasteboardType.URL) + pasteboard.setString(url!, forType: .URL) + pasteboard.setString(url!, forType: .string) } @objc