mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 07:31:15 +08:00
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
|
||||
|
||||
function! airline#load_theme()
|
||||
let g:airline_theme = get(g:, 'airline_theme', 'dark')
|
||||
if exists('*airline#themes#{g:airline_theme}#refresh')
|
||||
call airline#themes#{g:airline_theme}#refresh()
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user