Skip to content

Conversation

@imbant
Copy link
Contributor

@imbant imbant commented Apr 24, 2024

Hi. This PR is to fix this issue.

The problem is that when push() is called out of order, _data does not collect the input token correctly.

So I add a non-delta-encoded data attribute _dataNonDelta, which is used when the push() function is called in non-character stream order; it is eventually delta-encoded in build() or buildEdits().I hope this change doesn't affect any places that previously output _data.

If push() is called in order, we still use _data and it works the same as before.

For the implementation of _sortAndDeltaEncode, I refer to the vscode source code here

… function is called in non-character stream order; it is eventually delta-encoded at build time
@imbant imbant changed the title fix #1451 fix “Semantic tokens that are not in ascending order will not be highlighted” Apr 24, 2024
@imbant
Copy link
Contributor Author

imbant commented Apr 24, 2024

@microsoft-github-policy-service agree

@dbaeumer
Copy link
Member

Thanks for the PR. Highly appreciated. See my minor review comments.

@imbant
Copy link
Contributor Author

imbant commented May 1, 2024

Thanks for the review. I will resolve it later

@imbant
Copy link
Contributor Author

imbant commented May 6, 2024

@dbaeumer Hi. Please see my latest commit. Thanks.

@dbaeumer dbaeumer enabled auto-merge (squash) May 6, 2024 13:04
@vscodenpa vscodenpa added this to the May 2024 milestone May 6, 2024
@dbaeumer dbaeumer merged commit 4b5f9cf into microsoft:main May 6, 2024
@imbant imbant deleted the imbant_non_character_stream branch October 28, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants