Revision: 29368
          http://sourceforge.net/p/bibdesk/svn/29368
Author:   hofman
Date:     2025-07-25 21:40:20 +0000 (Fri, 25 Jul 2025)
Log Message:
-----------
don't return completions for sero character range, weird it is even asking

Modified Paths:
--------------
    trunk/bibdesk/BDSKEditor.m
    trunk/bibdesk/BDSKTextImportController.m

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2025-07-25 16:13:41 UTC (rev 29367)
+++ trunk/bibdesk/BDSKEditor.m  2025-07-25 21:40:20 UTC (rev 29368)
@@ -2613,7 +2613,7 @@
 
 - (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView 
completions:(NSArray *)words forPartialWordRange:(NSRange)charRange 
indexOfSelectedItem:(NSInteger *)idx{
     NSInteger row = [tableView rowForView:control];
-    if (row == -1) {
+    if (row == -1 || charRange.length == 0) {
                return words;
        } else if ([tableCellFormatter editAsComplexString]) {
                return [[BDSKCompletionManager sharedManager] 
possibleMatches:[[publication macroResolver] allMacroDefinitions] 

Modified: trunk/bibdesk/BDSKTextImportController.m
===================================================================
--- trunk/bibdesk/BDSKTextImportController.m    2025-07-25 16:13:41 UTC (rev 
29367)
+++ trunk/bibdesk/BDSKTextImportController.m    2025-07-25 21:40:20 UTC (rev 
29368)
@@ -1100,7 +1100,7 @@
 
 - (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView 
completions:(NSArray *)words forPartialWordRange:(NSRange)charRange 
indexOfSelectedItem:(NSInteger *)idx{
     NSInteger row = [itemTableView rowForView:control];
-    if (row == -1) {
+    if (row == -1 || charRange.length == 0) {
                return words;
        } else if ([tableCellFormatter editAsComplexString]) {
                return [[BDSKCompletionManager sharedManager] 
possibleMatches:[[self macroResolver] allMacroDefinitions]

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

Reply via email to