From 147cfbc4eb4326a7648d4bbdc24bee9d6dfb6d14 Mon Sep 17 00:00:00 2001 From: itchyny Date: Thu, 6 Feb 2014 10:52:05 +0900 Subject: [PATCH] evaluate functions once --- autoload/lightline.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index e5532ee..d2e5059 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -3,7 +3,7 @@ " Version: 0.0 " Author: itchyny " License: MIT License -" Last Change: 2013/12/05 13:39:56. +" Last Change: 2014/02/06 10:51:09. " ============================================================================= let s:save_cpo = &cpo @@ -118,6 +118,8 @@ function! lightline#init() if !exists('s:_statusline') | let s:_statusline = &statusline | endif if !exists('s:_tabline') | let s:_tabline = &tabline | endif if s:lightline.enable.tabline | set tabline=%!lightline#tabline() | endif + for f in values(s:lightline.component_function) | silent! call eval(f . '()') | endfor + for f in values(s:lightline.tab_component_function) | silent! call eval(f . '(0)') | endfor endfunction function! lightline#colorscheme()