From 6890d1ecf069870518403f20677f8333ec0a9ce8 Mon Sep 17 00:00:00 2001 From: Matt Wozniski Date: Sun, 2 May 2010 21:41:17 -0400 Subject: [PATCH] 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. --- after/plugin/CSApprox.vim | 4 ++++ plugin/CSApprox.vim | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 after/plugin/CSApprox.vim diff --git a/after/plugin/CSApprox.vim b/after/plugin/CSApprox.vim new file mode 100644 index 0000000..a9c123b --- /dev/null +++ b/after/plugin/CSApprox.vim @@ -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 diff --git a/plugin/CSApprox.vim b/plugin/CSApprox.vim index ac48f40..1c31b7c 100644 --- a/plugin/CSApprox.vim +++ b/plugin/CSApprox.vim @@ -886,12 +886,6 @@ augroup CSApprox "au User CSApproxPost highlight Normal ctermbg=none | highlight NonText ctermbg=None 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 let &cpo = s:savecpo unlet s:savecpo