init in case :so MYVIMRC

This commit is contained in:
itchyny
2013-08-25 16:25:21 +09:00
parent eed071a151
commit a6198c4765

View File

@@ -3,7 +3,7 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/24 19:16:30. " Last Change: 2013/08/25 16:24:57.
" ============================================================================= " =============================================================================
let s:save_cpo = &cpo let s:save_cpo = &cpo
@@ -13,6 +13,7 @@ let s:_ = 1
let s:is_win32term = (has('win32') || has('win64')) && !has('gui_running') let s:is_win32term = (has('win32') || has('win64')) && !has('gui_running')
function! lightline#update() function! lightline#update()
try
if s:_ | call lightline#init() | endif if s:_ | call lightline#init() | endif
let s = [lightline#statusline(0), lightline#statusline(1)] let s = [lightline#statusline(0), lightline#statusline(1)]
let w = winnr() let w = winnr()
@@ -20,6 +21,9 @@ function! lightline#update()
call setwinvar(n, '&statusline', s[n!=w]) call setwinvar(n, '&statusline', s[n!=w])
call setwinvar(n, 'lightline', n!=w) call setwinvar(n, 'lightline', n!=w)
endfor endfor
catch
call lightline#init()
endtry
endfunction endfunction
function! lightline#update_once() function! lightline#update_once()