Skip to content

Redefine highlights on colorscheme changes #20

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Sep 20, 2017

This will ensure that they get updated to match the new color
definitions.

This will ensure that they get updated to match the new color
definitions.
@@ -27,6 +27,7 @@ endif
if !exists('s:coverage_states')
let s:coverage_states = ['covered', 'uncovered', 'partial']
endif
let s:highlights_defined = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you need to guard this with if exists('s:highlights_defined')? autoload files can be re-executed whenever and AFAICT this shouldn't be reset to 0 in that case.


""
" Re-define highlights after the colorscheme was changed.
augroup coverage_highlights
Copy link
Contributor

Choose a reason for hiding this comment

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

Autocmds should be defined in a file plugin/autocmds.vim (w/ the standard maktaba#plugin#Enter guard) so they're loaded in a predictable manner and can be disabled if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants