vscode-rpgle icon indicating copy to clipboard operation
vscode-rpgle copied to clipboard

Content Assist sometimes not Picking up local workfields

Open Wikus86 opened this issue 1 year ago • 4 comments

Here is an exmaple of it not picking up the local workfield.

image

Another thing i noticed, linter picks up that it has not been references

image

Wikus86 avatar Jan 24 '24 07:01 Wikus86

@Wikus86 I have tried recreating this with no luck.

Are you able to paste your code (not take a screenshot of it) so I can copy and paste it directly?

image image

Thanks, Liam

worksofliam avatar Jan 25 '24 20:01 worksofliam

Yeah, I can also not reproduce it, only happens in some programs. Let me try doing a debug on the program giving the issue. Will advise if I find something

Wikus86 avatar Jan 30 '24 08:01 Wikus86

I found something, looks like it gets confused with a procedure in my copybook.

This is an example of the code

image

in completionItem.ts, in the completionItemProvider function, it picks up i am on line 318 which is almost correct, actually on line 319

Screenshot 2024-01-30 112042

Then it tries to find the procedure based on the line number

image

The problem is, in my copy book I have a procedure in that line range

Screenshot 2024-01-30 111944

and the index is before the actual procedure I am in

Screenshot 2024-01-30 112015

I hope this makes a bit of sense :)

Wikus86 avatar Jan 30 '24 09:01 Wikus86