account for empty vimrc with no colorscheme set.

This commit is contained in:
Bailey Ling 2013-08-18 04:56:38 +00:00
parent 88b910d959
commit bcba04e20c
1 changed files with 14 additions and 12 deletions

View File

@ -21,6 +21,7 @@ function! airline#switch_theme(name)
endfunction
function! airline#switch_matching_theme()
if exists('g:colors_name')
let v:errmsg = ''
silent! let palette = g:airline#themes#{g:colors_name}#palette
if empty(v:errmsg)
@ -34,6 +35,7 @@ function! airline#switch_matching_theme()
endif
endfor
endif
endif
return 0
endfunction