mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-07 20:54:26 +08:00
account for empty vimrc with no colorscheme set.
This commit is contained in:
@@ -21,6 +21,7 @@ function! airline#switch_theme(name)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#switch_matching_theme()
|
function! airline#switch_matching_theme()
|
||||||
|
if exists('g:colors_name')
|
||||||
let v:errmsg = ''
|
let v:errmsg = ''
|
||||||
silent! let palette = g:airline#themes#{g:colors_name}#palette
|
silent! let palette = g:airline#themes#{g:colors_name}#palette
|
||||||
if empty(v:errmsg)
|
if empty(v:errmsg)
|
||||||
@@ -34,6 +35,7 @@ function! airline#switch_matching_theme()
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
return 0
|
return 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user