From 787ae1cba8d86368f7ebe5177aa14fc792c2cb12 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Fri, 22 Mar 2013 12:39:44 +0100 Subject: [PATCH] =?UTF-8?q?Only=20=E2=80=9Cforce=E2=80=9D=20selection=20se?= =?UTF-8?q?arch=20when=20document=20window=20is=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Frameworks/DocumentWindow/src/DocumentController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frameworks/DocumentWindow/src/DocumentController.mm b/Frameworks/DocumentWindow/src/DocumentController.mm index 58574499..2b7c995b 100644 --- a/Frameworks/DocumentWindow/src/DocumentController.mm +++ b/Frameworks/DocumentWindow/src/DocumentController.mm @@ -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)