mirror of
https://github.com/textmate/textmate.git
synced 2026-01-20 20:27:59 -05:00
Inline deselectExtension code in OakSavePanel
The code is tweaked a bit compared to the category method we inlined.
This commit is contained in:
@@ -80,6 +80,14 @@
|
||||
NSString* path = result == NSOKButton ? [[savePanel.URL filePathURL] path] : nil;
|
||||
aCompletionHandler(path, optionsViewController.encodingOptions);
|
||||
}];
|
||||
[savePanel deselectExtension];
|
||||
|
||||
// Deselect Extension
|
||||
if([savePanel.firstResponder isKindOfClass:[NSTextView class]])
|
||||
{
|
||||
NSTextView* tw = (NSTextView*)savePanel.firstResponder;
|
||||
NSRange extRange = [tw.textStorage.string rangeOfString:@"."];
|
||||
if(extRange.location != NSNotFound)
|
||||
[tw setSelectedRange:NSMakeRange(0, extRange.location)];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user