Skip to content

Commit bc27fea

Browse files
committed
Fixes #12
1 parent b66760b commit bc27fea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SCXcodeSwitchExpander/DVTTextCompletionController+SCXcodeSwitchExpander.m

+3-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ - (BOOL)tryExpandingSwitchStatement
6464
IDEIndexCompletionItem *item = [self _selectedCompletionItem];
6565

6666
// Fetch all symbols matching the autocomplete item type
67-
IDEIndexCollection *collection = [index allSymbolsMatchingName:item.displayType kind:nil];
68-
67+
NSString *symbolName = (item.displayType.length ? item.displayType : item.displayText);
68+
IDEIndexCollection *collection = [index allSymbolsMatchingName:symbolName kind:nil];
69+
6970
// Find the first one of them that is a container
7071
for(IDEIndexSymbol *symbol in collection.allObjects) {
7172

0 commit comments

Comments
 (0)