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

document.getWordRangeAtPosition(position) not working properly in XML files. #149318

Closed
sushant3524 opened this issue May 12, 2022 · 1 comment · Fixed by #149369
Closed

document.getWordRangeAtPosition(position) not working properly in XML files. #149318

sushant3524 opened this issue May 12, 2022 · 1 comment · Fixed by #149369
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders languages-basic Basic language support issues verified Verification succeeded
Milestone

Comments

@sushant3524
Copy link

Example:

<content> 
    <function>PostChangeLog</function> 
    <Value3>1644336660000</Value3> 
    <DeviceID>FA954A84D674FAE</DeviceID> 
    <EntryGUID>793FCA-50B-76D-FDB-3BC93E512</EntryGUID>   
</content>

Some particular observations:

  • When putting the position of any character of the word PostChangeLog in the function I get the Word Range of the word PostChangeLog which is correct.
  • But when putting the position of any character of the word 1644336660000 in the function I get the Word Range of the whole document. (This is the issue that I am concerned with).
  • Furthermore, I tried some more combinations, so that I can get why is it happening:
    -- Any character of the word FA954A84D674FAE; Result - Word Range of the word FA954A84D674FAE
    -- Any character of the word 793FCA-50B-76D-FDB-3BC93E512; Result - Word Range of the word 793FCA-50B-76D-FDB-3BC93E512
@alexdima
Copy link
Member

I think this might be a problem with the XML word pattern, which came in via #127334

aeschli added a commit that referenced this issue May 12, 2022
@aeschli aeschli added this to the May 2022 milestone May 12, 2022
@aeschli aeschli added languages-basic Basic language support issues bug Issue identified by VS Code Team member as probable bug labels May 12, 2022
aeschli added a commit that referenced this issue May 13, 2022
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels May 13, 2022
@rebornix rebornix added the verified Verification succeeded label Jun 2, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders languages-basic Basic language support issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants