Revision: 28871 http://sourceforge.net/p/bibdesk/svn/28871 Author: hofman Date: 2024-04-27 15:47:10 +0000 (Sat, 27 Apr 2024) Log Message: ----------- don't complete title field, we don't get the default completions
Modified Paths: -------------- trunk/bibdesk/BDSKCompletionManager.m trunk/bibdesk/BDSKEditor.m Modified: trunk/bibdesk/BDSKCompletionManager.m =================================================================== --- trunk/bibdesk/BDSKCompletionManager.m 2024-04-27 09:25:34 UTC (rev 28870) +++ trunk/bibdesk/BDSKCompletionManager.m 2024-04-27 15:47:10 UTC (rev 28871) @@ -50,12 +50,10 @@ static id sharedManager = nil; static NSSet *completedFields = nil; -static NSSet *titleFields = nil; + (void)initialize { BDSKINITIALIZE; completedFields = [[NSSet alloc] initWithObjects:BDSKBooktitleString, BDSKJournalString, BDSKInstitutionString, BDSKPublisherString, BDSKSchoolString, BDSKOrganizationString, BDSKAddressString, BDSKKeywordsString, BDSKCrossrefString, nil]; - titleFields = [[NSSet alloc] initWithObjects:BDSKTitleString, BDSKChapterString, nil]; } + (id)sharedManager { @@ -197,9 +195,6 @@ } - (NSRange)entry:(NSString *)entry rangeForUserCompletion:(NSRange)charRange ofString:(NSString *)fullString { - if ([titleFields containsObject:entry]) - return charRange; - NSCharacterSet *wsCharSet = [NSCharacterSet whitespaceCharacterSet]; NSCharacterSet *acSet = [[BDSKTypeManager sharedManager] separatorCharacterSetForField:entry]; @@ -239,9 +234,7 @@ entry = BDSKAuthorString; else if ([entry isCitationField]) entry = BDSKCrossrefString; - else if ([titleFields containsObject:entry]) - return words; - + NSSet *strings = [autoCompletionDict objectForKey:entry]; if ([strings count] == 0) Modified: trunk/bibdesk/BDSKEditor.m =================================================================== --- trunk/bibdesk/BDSKEditor.m 2024-04-27 09:25:34 UTC (rev 28870) +++ trunk/bibdesk/BDSKEditor.m 2024-04-27 15:47:10 UTC (rev 28871) @@ -2470,7 +2470,7 @@ forBibTeXString:[textView string] partialWordRange:charRange indexOfBestMatch:idx]; - } else { + } else {NSLog(@"%@",words); return [[BDSKCompletionManager sharedManager] entry:[fields objectAtIndex:row] completions:words forPartialWordRange:charRange This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit