mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Let the bundle item chooser handle “option return to edit”
Previously using option return would only work for editing bundle items, not key binding files.
This commit is contained in:
@@ -445,11 +445,7 @@ BOOL HasDocumentWindow (NSArray* windows)
|
||||
- (void)bundleItemChooserDidSelectItems:(id)sender
|
||||
{
|
||||
for(NSDictionary* item in [sender selectedItems])
|
||||
{
|
||||
if(OakIsAlternateKeyOrMouseEvent())
|
||||
[[BundleEditor sharedInstance] revealBundleItem:bundles::lookup(to_s([item objectForKey:@"uuid"]))];
|
||||
else [NSApp sendAction:@selector(performBundleItemWithUUIDString:) to:nil from:[item objectForKey:@"uuid"]];
|
||||
}
|
||||
[NSApp sendAction:@selector(performBundleItemWithUUIDString:) to:nil from:[item objectForKey:@"uuid"]];
|
||||
}
|
||||
|
||||
// ===========================
|
||||
|
||||
@@ -887,6 +887,9 @@ static std::vector<bundles::item_ptr> relevant_items_in_scope (scope::context_t
|
||||
|
||||
- (void)accept:(id)sender
|
||||
{
|
||||
if(self.canEdit && OakIsAlternateKeyOrMouseEvent())
|
||||
return [self editItem:sender];
|
||||
|
||||
if(_bundleItemField == kBundleItemTitleField && OakNotEmptyString(self.filterString) && (self.tableView.selectedRow > 0 || [self.filterString length] > 1))
|
||||
{
|
||||
NSDictionary* item = self.items[self.tableView.selectedRow];
|
||||
|
||||
Reference in New Issue
Block a user