mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
macOS: Handle dropping of file promises into kitty in addition to file paths
Fixes #9084
This commit is contained in:
@@ -164,6 +164,8 @@ Detailed list of changes
|
||||
|
||||
- Fix a regression in 0.43.0 that caused high CPU usage when :opt:`disable_ligatures` was set to ``cursor`` and the tab bar was visible (:iss:`9071`)
|
||||
|
||||
- macOS: Handle dropping of file promises into kitty in addition to file paths (:pull:`9084`)
|
||||
|
||||
0.43.1 [2025-10-01]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -789,8 +789,19 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||
self.identifier = @"kitty-content-view";
|
||||
|
||||
[self updateTrackingAreas];
|
||||
// Register for file promises in addition to regular files (macOS 10.12+)
|
||||
if (@available(macOS 10.12, *)) {
|
||||
NSMutableArray *types = [NSMutableArray arrayWithObjects:
|
||||
NSPasteboardTypeFileURL,
|
||||
NSPasteboardTypeString,
|
||||
nil];
|
||||
// Add file promise types
|
||||
[types addObjectsFromArray:[NSFilePromiseReceiver readableDraggedTypes]];
|
||||
[self registerForDraggedTypes:types];
|
||||
} else {
|
||||
[self registerForDraggedTypes:@[NSPasteboardTypeFileURL, NSPasteboardTypeString]];
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user