mirror of
https://github.com/textmate/textmate.git
synced 2026-01-22 05:07:54 -05:00
Update window title when application is activated.
Variables customizing `windowTitle` such as `$TM_SCM_BRANCH` can change while TM is inactive, while user is working in command line or different app. So it is better to refresh `windowTitle` once we get back to TM.
This commit is contained in:
@@ -369,7 +369,12 @@ OAK_DEBUG_VAR(DocumentController);
|
||||
{
|
||||
DocumentController* controller = (DocumentController*)[window delegate];
|
||||
if([controller isKindOfClass:[DocumentController class]] && !controller->documentTabs.empty())
|
||||
{
|
||||
[controller->textView performSelector:@selector(applicationDidBecomeActiveNotification:) withObject:aNotification];
|
||||
|
||||
settings_t const& settings = [controller selectedDocument]->settings();
|
||||
controller.windowTitle = [NSString stringWithCxxString:settings.get(kSettingsWindowTitleKey, [controller selectedDocument]->display_name())];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user