-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5547295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kulabun , thanks for your contribution,
but it seems this commit has regression issue. In below screenshot, the first character after the dot is ignored when filtering the candidates:
5547295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't reproduce this issue. Do you have a minimal reproducible config?
5547295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the issue you are talking about is related. It's something happening before completion items list is retrieved, while my change only affects how completion item is being applied. You can see that the code is executed only on
self:get_completion_item().textEdit
is present and is not null.5547295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kulabun
The issue can be reproduced with this commit (reset to the prev commit doesn't reproduce the issue).
If you want, here is the code I used https://github.com/MaskRay/ccls/blob/master/src/main.cc#L119 , you need to generate the compile command database and link it to the source repo root.
Below is my minimal reproducible vim config:
5547295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reproduced with clangd. And this is caused by offset+1 at L70 in entry.lua (undoing just this line will fix it)
Why this change?
5547295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll revert +1 offset at the moment.
5547295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turned out the problem was in:
When the byte is null at
idx
index we we should returnoffset
rather thanoffset + 1