mirror of
https://github.com/textmate/textmate.git
synced 2026-01-21 04:38:13 -05:00
Clear file chooser filter string
Now that we re-use the window we need to manually clear the filter string (from last use).
This commit is contained in:
@@ -1448,13 +1448,7 @@ namespace
|
||||
{
|
||||
FileChooser* fc = [FileChooser sharedInstance];
|
||||
|
||||
if(OakPasteboardEntry* entry = [[OakPasteboard pasteboardWithName:NSFindPboard] current])
|
||||
{
|
||||
std::string str = to_s(entry.string);
|
||||
if(regexp::search("\\A.*?(\\.|/).*?:\\d+\\z", str.data(), str.data() + str.size()))
|
||||
fc.filterString = entry.string;
|
||||
}
|
||||
|
||||
fc.filterString = @"";
|
||||
fc.openDocuments = _documents;
|
||||
fc.currentDocument = _selectedDocument ? _selectedDocument->identifier() : oak::uuid_t();
|
||||
fc.scmInfo = _scmInfo;
|
||||
@@ -1462,6 +1456,13 @@ namespace
|
||||
fc.action = @selector(fileChooserDidSelectItems:);
|
||||
fc.path = self.projectPath ?: self.untitledSavePath ?: NSHomeDirectory();
|
||||
|
||||
if(OakPasteboardEntry* entry = [[OakPasteboard pasteboardWithName:NSFindPboard] current])
|
||||
{
|
||||
std::string str = to_s(entry.string);
|
||||
if(regexp::search("\\A.*?(\\.|/).*?:\\d+\\z", str.data(), str.data() + str.size()))
|
||||
fc.filterString = entry.string;
|
||||
}
|
||||
|
||||
[fc showWindowRelativeToWindow:self.window];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user