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

make signaturehelp traverse characters safely #894

Merged
merged 2 commits into from
Mar 13, 2022

Conversation

baronfel
Copy link
Contributor

@baronfel baronfel commented Mar 13, 2022

While investigating #891 (comment), @quantum-booty had a log line that suggested textDocument/signatureHelp wasn't traversing positions safely. This turned out to be the case, so I've pushed helper functions for safe incrementing and decrementing of positions down into the SourceText extensions, then updated the implementation of SignatureHelp to use these.

setting an empty filename led to incorrect range comparisons, so we need a SourceText that knows its tagged fileName
@baronfel baronfel force-pushed the fix-signature-help-out-of-bounds branch from b402183 to 8a7783d Compare March 13, 2022 20:49
@baronfel baronfel marked this pull request as ready for review March 13, 2022 20:51
@baronfel baronfel merged commit 11ed92c into ionide:main Mar 13, 2022
@baronfel baronfel deleted the fix-signature-help-out-of-bounds branch March 13, 2022 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant