aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2023-02-22 22:12:36 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2023-02-22 22:12:36 +1100
commit43d0f3772991b163d11693e805efaaa700b4f745 (patch)
treea42911161cb26f3a3f640c55a7383f2cf36f4868
parentf69f3e612733f95f6ee453372bbc65aedb91f8c4 (diff)
downloadscintilla-mirror-43d0f3772991b163d11693e805efaaa700b4f745.tar.gz
Make drag pasteboard change work before 10.13.
-rw-r--r--cocoa/ScintillaCocoa.mm7
1 files changed, 6 insertions, 1 deletions
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);