From 43d0f3772991b163d11693e805efaaa700b4f745 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Wed, 22 Feb 2023 22:12:36 +1100 Subject: Make drag pasteboard change work before 10.13. --- cocoa/ScintillaCocoa.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 83c163a85..4823f4b8b 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1369,7 +1369,12 @@ void ScintillaCocoa::StartDrag() { // Put the data to be dragged on the drag pasteboard. SelectionText selectedText; - NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName: NSPasteboardNameDrag]; + NSPasteboard *pasteboard = nil; + if (@available(macOS 10.13, *)) { + pasteboard = [NSPasteboard pasteboardWithName: NSPasteboardNameDrag]; + } else { + pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard]; + } CopySelectionRange(&selectedText); SetPasteboardData(pasteboard, selectedText); -- cgit v1.2.3