From 1a5167d29f4dc1fdc26de003e353dee37679e95b Mon Sep 17 00:00:00 2001 From: itchyny Date: Thu, 22 Aug 2013 01:35:34 +0900 Subject: [PATCH] improve setting colorscheme --- autoload/lightline.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index ddeacb3..7762261 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -57,13 +57,15 @@ function! lightline#init() endfor try 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'] call lightline#highlight(m) endfor let s:_ = 0 - catch - call lightline#error('Colorscheme ' . g:lightline.colorscheme . ' not found.') - let g:lightline.colorscheme = 'default' endtry endfunction