mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +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`)
|
- 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]
|
0.43.1 [2025-10-01]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@@ -789,8 +789,19 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|||||||
self.identifier = @"kitty-content-view";
|
self.identifier = @"kitty-content-view";
|
||||||
|
|
||||||
[self updateTrackingAreas];
|
[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]];
|
[self registerForDraggedTypes:@[NSPasteboardTypeFileURL, NSPasteboardTypeString]];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user