Only “force” selection search when document window is key

Since the find dialog itself will call orderFrontFindPanel: when selecting the first item in the “in” pop-up (this is required to have it show ⌘F as key equivalent) we need to avoid changing search scope to “selection” for this case.
This commit is contained in:
Allan Odgaard
2013-03-22 12:39:44 +01:00
parent 17e67642b8
commit 787ae1cba8

View File

@@ -1761,7 +1761,7 @@ namespace
find.projectIdentifier = self.identifier;
NSInteger mode = [sender respondsToSelector:@selector(tag)] ? [sender tag] : find_tags::in_document;
if(mode == find_tags::in_document && self.textView.hasMultiLineSelection)
if(mode == find_tags::in_document && [self.window isKeyWindow] && self.textView.hasMultiLineSelection)
mode = find_tags::in_selection;
switch(mode)