Revision: 28869
http://sourceforge.net/p/bibdesk/svn/28869
Author: hofman
Date: 2024-04-26 16:07:54 +0000 (Fri, 26 Apr 2024)
Log Message:
-----------
return immediately when there are no completions for a field
Modified Paths:
--------------
trunk/bibdesk/BDSKCompletionManager.m
Modified: trunk/bibdesk/BDSKCompletionManager.m
===================================================================
--- trunk/bibdesk/BDSKCompletionManager.m 2024-04-26 16:01:59 UTC (rev
28868)
+++ trunk/bibdesk/BDSKCompletionManager.m 2024-04-26 16:07:54 UTC (rev
28869)
@@ -235,13 +235,17 @@
else if ([entry isCitationField])
entry = BDSKCrossrefString;
+ NSSet *strings = [autoCompletionDict objectForKey:entry];
+
+ if ([strings count] == 0)
+ return @[];
+
NSString *matchString = [[fullString substringWithRange:charRange]
stringByRemovingCurlyBraces];
// in case this is only a brace, return an empty array to avoid returning
every value in the file
- if([matchString isEqualToString:@""])
+ if ([matchString isEqualToString:@""])
return @[];
- NSSet *strings = [autoCompletionDict objectForKey:entry];
NSMutableArray *completions = [NSMutableArray array];
BOOL isAuthor = [entry isEqualToString:BDSKAuthorString];
NSString *matched = nil;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit