From 80b1bd5863e89c63d84d960c90a83435a97aa72f Mon Sep 17 00:00:00 2001 From: Matt Wozniski Date: Sat, 7 Nov 2009 11:46:48 -0500 Subject: [PATCH] Kludge around inability to reference autoloads This was causing problems when running in Vim 7.0 or 7.1. graywh bisected down to the commit introducing it for me, (d2c906) making it easy to spot the problem. --- plugin/CSApprox.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin/CSApprox.vim b/plugin/CSApprox.vim index 5b5c0d8..664058f 100644 --- a/plugin/CSApprox.vim +++ b/plugin/CSApprox.vim @@ -410,6 +410,11 @@ function! s:FixupCtermInfo(highlights) endfor endfunction +" {>2} Kludge around inability to reference autoload functions +function! s:DefaultApproximator(...) + return call('csapprox#per_component#Approximate', a:000) +endfunction + " {>2} Set cterm colors for a highlight group " Given the information for a single highlight group (ie, the value of " one of the items in s:Highlights() already normalized with s:FixupCtermInfo @@ -422,8 +427,7 @@ function! s:SetCtermFromGui(hl) " Set up the default approximator function, if needed if !exists("g:CSApprox_approximator_function") - let g:CSApprox_approximator_function = - \ function("csapprox#per_component#Approximate") + let g:CSApprox_approximator_function = function("s:DefaultApproximator") endif " Clear existing highlights