-
Notifications
You must be signed in to change notification settings - Fork 93
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
completionRequest.getReplaceRange() is erroneous in text that contains / #723
Comments
Indeed it's a bug. The replace range for text node should be the full text content. I'm refactoring a little XMLPositionUtility for an another issue and after that I will fix this issue. |
I think the bug is https://github.com/eclipse/lemminx/blob/2aad97f8bb81ff447d9d44acd02c3df0bc3ea841/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/services/XMLCompletions.java#L756 Before this line, you should compute the proper replace range Range textRange = ...
request.setReplaceRange(textRange); |
Fix eclipse-lemminx#723 Signed-off-by: Andrew Obuchowicz <[email protected]>
Fix eclipse-lemminx#723 Signed-off-by: Andrew Obuchowicz <[email protected]>
Fixes eclipse-lemminx#723 Signed-off-by: azerr <[email protected]>
Fixes eclipse-lemminx#723 Signed-off-by: azerr <[email protected]>
Fixes #723 Signed-off-by: azerr <[email protected]>
In LemMinX extensions,
CompletionParticipantAdapter.onXMLContent
, when on a node that contains/
(egpath/to/something
), thenrequest.getReplaceRange()
returns only the offset location (resulting in an insertion) while in other cases, it returns the whole text node area (which allows filtering and replacement).I would expect to always get the whole text node range.
If it's not possible to always have the whole text node range, then it should always be the offset; or whatever over sane convention as long it's always the same one.
The text was updated successfully, but these errors were encountered: