mirror of
https://github.com/textmate/textmate.git
synced 2026-01-22 05:07:54 -05:00
Go to Current Document is now a toggle
This also works as a (quick) way to deselect all in the file browser (i.e. hit ⌃⌘R twice) which is useful when one wants to run commands on the entire project (e.g. Git → Show Uncommitted Changes).
This commit is contained in:
@@ -908,7 +908,10 @@ NSString* const kUserDefaultsFileBrowserPlacementKey = @"fileBrowserPlacement";
|
||||
{
|
||||
D(DBF_DocumentController, bug("%s\n", [self selectedDocument]->path().c_str()););
|
||||
self.fileBrowserHidden = NO;
|
||||
[fileBrowser showURL:[NSURL fileURLWithPath:[NSString stringWithCxxString:[self selectedDocument]->path()]]];
|
||||
NSURL* currentDocumentURL = [NSURL fileURLWithPath:[NSString stringWithCxxString:[self selectedDocument]->path()]];
|
||||
if([fileBrowser.selectedURLs count] == 1 && [currentDocumentURL isEqualTo:[fileBrowser.selectedURLs lastObject]])
|
||||
[fileBrowser deselectAll:self];
|
||||
else [fileBrowser showURL:currentDocumentURL];
|
||||
}
|
||||
|
||||
- (IBAction)goToProjectFolder:(id)sender
|
||||
|
||||
Reference in New Issue
Block a user