diff options
author | nyamatongwe <unknown> | 2011-07-10 12:17:12 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-07-10 12:17:12 +1000 |
commit | 6fe7f8cd0cb14185b04ea532e1ce453f1003b8cb (patch) | |
tree | 6bdf256921b30b0336a07a48270c9c1ad47cb644 | |
parent | 4b991bfffc9f20740e7911f4141cbbadde03140d (diff) | |
download | scintilla-mirror-6fe7f8cd0cb14185b04ea532e1ce453f1003b8cb.tar.gz |
Allow drag to trash to delete.
-rw-r--r-- | cocoa/ScintillaView.mm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 5c14560a7..5025fe209 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -501,7 +501,19 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; */ - (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL) flag { - return NSDragOperationCopy | NSDragOperationMove; + return NSDragOperationCopy | NSDragOperationMove | NSDragOperationDelete; +} + +//-------------------------------------------------------------------------------------------------- + +/** + * Finished a drag: may need to delete selection. + */ + +- (void)draggedImage:(NSImage *)image endedAt:(NSPoint)screenPoint operation:(NSDragOperation)operation { + if (operation == NSDragOperationDelete) { + mOwner.backend->WndProc(SCI_CLEAR, 0, 0); + } } //-------------------------------------------------------------------------------------------------- |