File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474 [[NSProcessInfo processInfo ] environment ]];
7575
7676 // Try to find highlight location
77- NSString *highlightPath = [defaults valueForKey: @" pathHL" ];
77+ NSString *highlightPath = [[ defaults persistentDomainForName: myDomain] valueForKey: @" pathHL" ];
7878 if (highlightPath == nil ) {
7979 NSUserDefaults *userDefaults = [[NSUserDefaults alloc ] init ];
8080 NSData * data = runTask (@" which highlight" , env, status);
8181 highlightPath = [[[[NSString alloc ] initWithData: data encoding: NSUTF8StringEncoding] autorelease ] stringByTrimmingCharactersInSet: [NSCharacterSet newlineCharacterSet ]];
82- if ([highlightPath hasPrefix: @" /" ] && [highlightPath hasSuffix: @" highlight" ]) { // i.e. highlighPath looks like the actual path
82+ if (*status == 0 && [highlightPath hasPrefix: @" /" ] && [highlightPath hasSuffix: @" highlight" ]) { // i.e. highlightPath looks like the actual path
8383 NSMutableDictionary *newDefaults = [NSMutableDictionary dictionaryWithObject: highlightPath forKey: @" pathHL" ];
8484 [newDefaults addEntriesFromDictionary: [defaults persistentDomainForName: myDomain]];
8585 [userDefaults setPersistentDomain: newDefaults forName: myDomain];
You can’t perform that action at this time.
0 commit comments