Safety: Make sure g:airline_theme is defined before using it
fixes #1624
This commit is contained in:
parent
a90ac37cb3
commit
c76019ac9e
|
@ -34,6 +34,7 @@ function! airline#add_inactive_statusline_func(name)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#load_theme()
|
function! airline#load_theme()
|
||||||
|
let g:airline_theme = get(g:, 'airline_theme', 'dark')
|
||||||
if exists('*airline#themes#{g:airline_theme}#refresh')
|
if exists('*airline#themes#{g:airline_theme}#refresh')
|
||||||
call airline#themes#{g:airline_theme}#refresh()
|
call airline#themes#{g:airline_theme}#refresh()
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue