Skip to content

Commit ad7332f

Browse files
committed
Fix bug where could not use dot notation on procedures
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
1 parent d85361b commit ad7332f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

extension/server/src/providers/completionItem.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default async function completionItemProvider(handler: CompletionParams):
8484
if (!word) break;
8585

8686
if (currentDef) {
87-
if (currentDef.subItems && currentDef.subItems.length > 0) {
87+
if (currentDef.type !== `procedure` && currentDef.subItems && currentDef.subItems.length > 0) {
8888
currentDef = currentDef.subItems.find(subItem => subItem.name.toUpperCase() === word);
8989
}
9090

@@ -94,8 +94,6 @@ export default async function completionItemProvider(handler: CompletionParams):
9494
if (currentDef) {
9595
if (currentDef.type === `struct` && currentDef.keyword[`QUALIFIED`] === undefined) {
9696
currentDef = undefined;
97-
} else if (currentDef.type === `procedure`) {
98-
currentDef = undefined;
9997
}
10098

10199
// All good!
@@ -219,6 +217,10 @@ export default async function completionItemProvider(handler: CompletionParams):
219217
item.insertText = `${procedure.name}(${procedure.subItems.map((parm, index) => `\${${index + 1}:${parm.name}}`).join(`:`)})`;
220218
item.detail = prettyKeywords(procedure.keyword);
221219
item.documentation = procedure.description;
220+
221+
if (procedure.subItems.length > 0) {
222+
item.command = { command: `editor.action.triggerParameterHints`, title: `Trigger Parameter Hints` };
223+
}
222224
items.push(item);
223225
}
224226

0 commit comments

Comments
 (0)