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

Incorrect active_signature count when displaying signature help #47

Open
offsetcyan opened this issue Aug 16, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@offsetcyan
Copy link
Contributor

offsetcyan commented Aug 16, 2024

Describe the bug

ELP sends an incorrect active_signature count when displaying signature help.
According to helix-editor/helix#11269 it's an off-by-one error.

To Reproduce

Write a self-recursive function where the call has the same number of arguments as the function of that name that takes the most parameters, writing the arguments inside already-complete parentheses. A crash, at least in Helix, only occurs modifying the final argument to a function call when all other arguments are supplied.

i.e.

-module(test).

f(_) -> f(). % this is fine.
f(_) -> f(1). % adding in this 1 post-hoc will crash Helix because of this incorrect count.

Expected behavior

An correct active signature count is sent by elp.

Actual behavior

An incorrect active signature count is sent by elp.

Context

  • ELP Version (output of elp version): elp 1.1.0+build-2024-07-16
  • Editor used:
@offsetcyan offsetcyan added the bug Something isn't working label Aug 16, 2024
@offsetcyan
Copy link
Contributor Author

Here is a helix.log output which shows communication with the LSP.

@robertoaloi robertoaloi self-assigned this Aug 26, 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

No branches or pull requests

2 participants