Closed hugocaillard closed 1 month ago
Attention: Patch coverage is 0%
with 7 lines
in your changes are missing coverage. Please review.
Project coverage is 40.72%. Comparing base (
fdb3b3f
) to head (43085cc
).
Files | Patch % | Lines |
---|---|---|
...ents/clarity-lsp/src/common/requests/completion.rs | 0.00% | 7 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
In some rare cases, eg: if the LSP state isn't up to date, it's possible that the cursor position is past the end of the line (as the LSP sees it).
This PR adds a safety check before getting the beginning of the line with
line[..position.character as usize]
. This PR also slightly refactor this method