Skip to content

Commit 0e28a86

Browse files
committed
Improve detection of found symbols
1 parent fa0e90d commit 0e28a86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ai_symbols.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ export default languages.registerDocumentSymbolProvider(AUTOIT_MODE, {
108108
}
109109

110110
funcName = functionPattern.exec(text);
111-
if (funcName && !found.includes(funcName[1])) {
111+
if (funcName && !found.includes(funcName[0])) {
112112
const functionSymbol = createFunctionSymbol(funcName[1], doc, doc.getText());
113113
result.push(functionSymbol);
114-
found.push(funcName[1]);
114+
found.push(funcName[0]);
115115
}
116116

117117
if (config.showVariablesInGoToSymbol) {
@@ -171,7 +171,7 @@ export default languages.registerDocumentSymbolProvider(AUTOIT_MODE, {
171171
const regionSymbol = createRegionSymbol(regionName[1], doc, doc.getText());
172172
if (regionSymbol) {
173173
result.push(regionSymbol);
174-
found.push(regionName[1]);
174+
found.push(regionName[0]);
175175
}
176176
}
177177
}

0 commit comments

Comments
 (0)