mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Ensure pending bundle index changes are saved during quit
This commit is contained in:
@@ -57,10 +57,19 @@ static double const kPollInterval = 3*60*60;
|
||||
{
|
||||
sourceList = bundles_db::sources();
|
||||
bundlesIndex = bundles_db::index(kInstallDirectory);
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:NSApp];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification*)aNotification
|
||||
{
|
||||
D(DBF_BundlesManager, bug("\n"););
|
||||
if(self.needsSaveBundlesIndex)
|
||||
[self saveBundlesIndex:self];
|
||||
}
|
||||
|
||||
- (void)setAutoUpdateBundles:(BOOL)flag
|
||||
{
|
||||
if(_autoUpdateBundles == flag)
|
||||
|
||||
Reference in New Issue
Block a user