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

Emit a ModelTokensChangedEvent for all the lines when setting a null grammar #69

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

danipen
Copy link
Owner

@danipen danipen commented Jul 31, 2024

Fixes #68

Issue
When a null grammar is set after previously setting a grammar with line highlights, some lines remain tokenized.

Resolution
To fix this, we now emit a ModelTokensChangedEvent to notify the IModelTokensChangedListener that the state for all lines has changed. This ensures that all lines are properly updated.

Changes

  • Emitted ModelTokensChangedEvent after setting a null grammar.
  • Added a unit test that covers this scenario.

@danipen danipen merged commit 8bb19f1 into master Jul 31, 2024
5 of 6 checks passed
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.

Some lines remains highlighted after setting a null grammar
1 participant