Let a document search clear the folder results used by ⌘G

If the user does a folder search then ⌘G will step through all the matches, opening documents as required. Previously the user would have to do a new search, using a different search string, to stop ⌘G from moving to a new document. It is now possible to stop the behavior using ⌘F followed by ↩.
This commit is contained in:
Allan Odgaard
2013-06-28 21:50:07 +02:00
parent 27e0abfa39
commit fd6e47b023

View File

@@ -255,6 +255,7 @@ NSString* const FFFindWasTriggeredByEnter = @"FFFindWasTriggeredByEnter";
}
self.closeWindowOnSuccess = action == FindActionFindNext && [[NSApp currentEvent] type] == NSKeyDown && to_s([NSApp currentEvent]) == utf8::to_s(NSCarriageReturnCharacter);
[OakPasteboard pasteboardWithName:NSFindPboard].auxiliaryOptionsForCurrent = nil;
[NSApp sendAction:@selector(performFindOperation:) to:nil from:self];
}
[self updateActionButtons:self];