Revision: 22201
          http://sourceforge.net/p/bibdesk/svn/22201
Author:   hofman
Date:     2018-04-30 17:16:55 +0000 (Mon, 30 Apr 2018)
Log Message:
-----------
show macro expansions in completions for text import controller

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

Modified: trunk/bibdesk/BDSKTextImportController.m
===================================================================
--- trunk/bibdesk/BDSKTextImportController.m    2018-04-30 17:12:49 UTC (rev 
22200)
+++ trunk/bibdesk/BDSKTextImportController.m    2018-04-30 17:16:55 UTC (rev 
22201)
@@ -1006,11 +1006,12 @@
        }
 }
 
-- (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView 
completions:(NSArray *)words forPartialWordRange:(NSRange)charRange 
indexOfSelectedItem:(NSInteger *)idx{
+- (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView 
completions:(NSArray *)words forPartialWordRange:(NSRange)charRange 
labels:(NSArray **)labels indexOfSelectedItem:(NSInteger *)idx{
     if (control != itemTableView) {
                return words;
        } else if ([complexStringEditor isAttached]) {
-               return [[BDSKCompletionManager sharedManager] 
possibleMatches:[[self macroResolver] allMacroDefinitions] 
+               return [[BDSKCompletionManager sharedManager] 
possibleMatches:[[self macroResolver] allMacroDefinitions]
+                                    labels:labels 
                                                   forBibTeXString:[textView 
string] 
                                                                
partialWordRange:charRange 
                                                                
indexOfBestMatch:idx];
@@ -1023,6 +1024,10 @@
        }
 }
 
+- (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView 
completions:(NSArray *)words forPartialWordRange:(NSRange)charRange 
indexOfSelectedItem:(NSInteger *)idx{
+    return [self control:control textView:textView completions:words 
forPartialWordRange:charRange labels:NULL indexOfSelectedItem:idx];
+}
+
 - (BOOL)control:(NSControl *)control textViewShouldAutoComplete:(NSTextView 
*)textview {
     if (control == itemTableView)
                return [[NSUserDefaults standardUserDefaults] 
boolForKey:BDSKEditorFormShouldAutoCompleteKey];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to