Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

active_parameter out of range for first param of multi-word instructions #24

Closed
aazuspan opened this issue Aug 16, 2024 · 0 comments · Fixed by #25
Closed

active_parameter out of range for first param of multi-word instructions #24

aazuspan opened this issue Aug 16, 2024 · 0 comments · Fixed by #25
Assignees
Labels
bug Something isn't working

Comments

@aazuspan
Copy link
Owner

When getting the arg index for signature help on multi-word instructions, we offset the index by -1 to account for the extra arg:

if str(triggered_opcode) in MULTI_WORD_INSTRUCTIONS and arg_idx != -1:
arg_idx -= 1

On the first parameter, this makes the arg index -1 which is out of range for SignatureHelp.active_parameter, leading to a ValueError. The offset should only be applied if arg_idx != 0. The existing check for arg_idx != -1 can be removed, since that assumed that -1 would correspond with the final parameter.

@aazuspan aazuspan added the bug Something isn't working label Aug 16, 2024
@aazuspan aazuspan self-assigned this Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant