mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Simplify document open API
Removed the ability to specify wether documents should open in current window or a new window — all documents opened via this API will go through the same algorithm to find where the documents should end up (more choice is just adding confusion and complexity).
This commit is contained in:
@@ -1890,7 +1890,7 @@ static NSUInteger DisableSessionSavingCount = 0;
|
||||
|
||||
NSString* projectId = [NSString stringWithCxxString:collection];
|
||||
DocumentController* controller = AllControllers()[projectId];
|
||||
if(collection == document::kCollectionCurrent)
|
||||
if(collection == document::kCollectionAny)
|
||||
controller = [SortedControllers() firstObject];
|
||||
|
||||
if(controller)
|
||||
@@ -1911,7 +1911,7 @@ static NSUInteger DisableSessionSavingCount = 0;
|
||||
{
|
||||
controller = [DocumentController new];
|
||||
controller.documents = make_vector(document);
|
||||
if(collection != document::kCollectionCurrent && collection != document::kCollectionNew)
|
||||
if(collection != document::kCollectionAny)
|
||||
controller.identifier = projectId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user