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

Fix: properly update highlights on colorscheme change #68

Conversation

theofabilous
Copy link
Contributor

Fixes incorrect highlight updates when colorscheme is changed. This is only relevant to this feature branch.

Prior to these changes, any "patched" devicon highlight was not "re-patched" when colorscheme is changed (by patched, I mean "create a separate highlight group for the devicon that inherits the winbar background highlights"). Now this is done.

Additionally, the ColorScheme autocmd event now schedules the updating of highlights instead of triggering it automatically. This is useful when the user sets some custom highlights after calling :colorscheme. Prior to this, if the user did something like:

vim.cmd('colorscheme <some colorscheme>')
vim.api.nvim_set_hl(0, 'WinBar', { ... })

the highlights would be created before the WinBar highlight is manually set, and thus not reflected in DropBar.
Now, since the update is scheduled, the above example would be reflected in DropBar highlights.

@theofabilous
Copy link
Contributor Author

I suspect #69 will fix the failing tests in this PR. I created a separate PR for the fix as the changes are unrelated.

@Bekaboo Bekaboo merged commit a13f4de into Bekaboo:feat-winbar-background-highlight Aug 28, 2023
3 of 4 checks passed
@Bekaboo
Copy link
Owner

Bekaboo commented Aug 28, 2023

Thanks for your contribution! Sorry for the late reply.

@theofabilous theofabilous deleted the feat-winbar-background-highlight branch September 22, 2023 16:17
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.

2 participants