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

Register the current EditorTheme and retrigger monaco tokenizing #5728

Merged
merged 2 commits into from
Jul 17, 2019

Conversation

jbicker
Copy link
Contributor

@jbicker jbicker commented Jul 16, 2019

...initially and after theme changed.
Additionally remove old css theme class from body.
Fixes #4550

As a test one should add a default theme to package.json different fro the dark theme.

Thanks a lot to @akosyakov for helping with this fix!!!

@jbicker jbicker requested a review from akosyakov July 16, 2019 15:43
@jbicker jbicker force-pushed the start-with-correct-default-theme branch from 141f874 to ca43970 Compare July 16, 2019 15:44
@akosyakov
Copy link
Member

Just to sum up: the root cause was a race condition between updating textmate and monaco themes. Sometimes monaco theme will be updated before leading to coloring a file with an old theme. Now textmate should be updated before monaco theme.

Funny effect was that a file could end up be highlighted partially by old and new themes if an update of a textmate theme happens while monaco still running tokenization.

...initially and after theme changed.
Additionally remove old css theme class from body.
Fixes #4550

Signed-off-by: Jan Bicker <jan.bicker@typefox.io>
@jbicker jbicker force-pushed the start-with-correct-default-theme branch from ca43970 to 62d1e5c Compare July 16, 2019 15:56
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbicker it did not work on initialization, i.e. the command palette had bogus colors (it inherits them from the body).

I've pushed an additional commit to fix it. Rather than that it works good, not race conditions anymore.

@akosyakov akosyakov merged commit fa15670 into master Jul 17, 2019
@akosyakov akosyakov deleted the start-with-correct-default-theme branch July 17, 2019 06:09
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.

textmate highlighting is missing
2 participants