mirror of
https://github.com/textmate/textmate.git
synced 2026-01-20 20:27:59 -05:00
Don’t pre-select (find) “in selection” by default
Previously this would be selected if the user had a multi-line selection and was pressing ⌘F. The old behavior can be restored using:
defaults write findInSelectionByDefault -bool YES
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
namespace find_tags { enum { in_document = 1, in_selection, in_project, in_folder }; } // From AppController.h
|
||||
|
||||
static NSString* const kUserDefaultsFindInSelectionByDefault = @"findInSelectionByDefault";
|
||||
static NSString* const OakDocumentPboardType = @"OakDocumentPboardType"; // drag’n’drop of tabs
|
||||
static BOOL IsInShouldTerminateEventLoop = NO;
|
||||
|
||||
@@ -1782,7 +1783,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.window isKeyWindow] && self.textView.hasMultiLineSelection)
|
||||
if(mode == find_tags::in_document && [[NSUserDefaults standardUserDefaults] boolForKey:kUserDefaultsFindInSelectionByDefault] && [self.window isKeyWindow] && self.textView.hasMultiLineSelection)
|
||||
mode = find_tags::in_selection;
|
||||
|
||||
switch(mode)
|
||||
|
||||
Reference in New Issue
Block a user