aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r--cocoa/ScintillaView.mm10
1 files changed, 9 insertions, 1 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index 1ca7ab8e2..ad074b496 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -235,7 +235,15 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) {
trackingArea = nil;
mMarkedTextRange = NSMakeRange(NSNotFound, 0);
- [self registerForDraggedTypes: @[NSPasteboardTypeString, ScintillaRecPboardType, NSFilenamesPboardType]];
+ if (@available(macOS 10.13, *)) {
+ [self registerForDraggedTypes: @[NSPasteboardTypeString, ScintillaRecPboardType, NSPasteboardTypeFileURL]];
+ } else {
+ // Use old deprecated type
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ [self registerForDraggedTypes: @[NSPasteboardTypeString, ScintillaRecPboardType, NSFilenamesPboardType]];
+#pragma clang diagnostic pop
+ }
// Set up accessibility in the text role
if ([self respondsToSelector: @selector(setAccessibilityElement:)]) {