improve performance with accent cache (#326).

This commit is contained in:
Bailey Ling
2013-11-01 00:54:10 -04:00
parent de1d1e365e
commit 99b7cdf334
3 changed files with 11 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ let s:spc = g:airline_symbols.space
function! s:wrap_accent(part, value)
if exists('a:part.accent')
call airline#highlighter#add_accent(a:part.accent)
return '%#__accent_'.(a:part.accent).'#'.a:value.'%#__restore__#'
endif
return a:value