improve setting colorscheme

This commit is contained in:
itchyny
2013-08-22 01:35:34 +09:00
parent e8fbd0f0e9
commit 1a5167d29f

View File

@@ -57,13 +57,15 @@ function! lightline#init()
endfor endfor
try try
let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette
catch
call lightline#error('Colorscheme ' . g:lightline.colorscheme . ' not found.')
let g:lightline.colorscheme = 'default'
let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette
finally
for m in ['normal', 'insert', 'replace', 'visual', 'inactive', 'command'] for m in ['normal', 'insert', 'replace', 'visual', 'inactive', 'command']
call lightline#highlight(m) call lightline#highlight(m)
endfor endfor
let s:_ = 0 let s:_ = 0
catch
call lightline#error('Colorscheme ' . g:lightline.colorscheme . ' not found.')
let g:lightline.colorscheme = 'default'
endtry endtry
endfunction endfunction