Fix up colors in an after/plugin instead of plugin

As suggested by Ingo Karkat, this will help CSApprox to better cope with
other plugins that set colors themselves.
This commit is contained in:
Matt Wozniski 2010-05-02 21:41:17 -04:00
parent 5ea9ec2169
commit 6890d1ecf0
2 changed files with 4 additions and 6 deletions

View File

@ -0,0 +1,4 @@
" The last thing to do when sourced is to run and actually fix up the colors.
if !has('gui_running') && exists(':CSApprox')
CSApprox
endif

View File

@ -886,12 +886,6 @@ augroup CSApprox
"au User CSApproxPost highlight Normal ctermbg=none | highlight NonText ctermbg=None "au User CSApproxPost highlight Normal ctermbg=none | highlight NonText ctermbg=None
augroup END augroup END
" {>2} Execute
" The last thing to do when sourced is to run and actually fix up the colors.
if !has('gui_running')
call s:CSApprox()
endif
" {>1} Restore compatibility options " {>1} Restore compatibility options
let &cpo = s:savecpo let &cpo = s:savecpo
unlet s:savecpo unlet s:savecpo