check existence of inactive modified colors before using them.
This commit is contained in:
parent
5754bcabce
commit
83bbd09b0e
@ -122,11 +122,16 @@ function! airline#check_mode(winnr)
|
||||
if g:airline_detect_modified
|
||||
if &modified
|
||||
call add(l:mode, 'modified')
|
||||
let colors = g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c
|
||||
let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c')
|
||||
\ ? g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c
|
||||
\ : []
|
||||
else
|
||||
let colors = g:airline#themes#{g:airline_theme}#palette.inactive.airline_c
|
||||
let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive.airline_c')
|
||||
\ ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c
|
||||
\ : []
|
||||
endif
|
||||
|
||||
if !empty(colors)
|
||||
for winnr in range(1, winnr('$'))
|
||||
if winnr != a:winnr
|
||||
\ && has_key(s:contexts, winnr)
|
||||
@ -135,6 +140,7 @@ function! airline#check_mode(winnr)
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
if g:airline_detect_paste && &paste
|
||||
call add(l:mode, 'paste')
|
||||
|
Loading…
Reference in New Issue
Block a user