-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fix highlights #805
Fix highlights #805
Conversation
5818c4b
to
5dcef54
Compare
language-server/dm/document.ml
Outdated
(List.map (fun (_,x) -> Sentence x) @@ SM.bindings parsed.sentences_by_id) ; | ||
(List.map (fun (_,x) -> Sentence x) @@ LM.bindings parsed.sentences_by_end) ; |
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.
this should be reverted, or better the two maps should be printed for future debugging
let sentences_by_end = LM.remove old_sentence.stop parsed.sentences_by_end in | ||
let sentences_by_end = match LM.find_opt old_sentence.stop parsed.sentences_by_end with | ||
| Some { id } when Stateid.equal id new_sentence.id -> | ||
LM.remove old_sentence.stop parsed.sentences_by_end | ||
| _ -> parsed.sentences_by_end | ||
in |
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.
CC @maximedenes
It would be nice to have some unit tests on the contents of |
If we remove the debug prints I believe we could merge and release |
A nasty bug would overwrite a sentence if by chance they had the same end loc.
When there is a non-invalidating edit, the exec overview needs to be shifted (like for the diagnostics).
Closes #803