Add checks for existing key to make #786 work in neovim
This commit is contained in:
parent
540c148d31
commit
a0110e13bd
@ -161,7 +161,7 @@ function! airline#check_mode(winnr)
|
|||||||
call add(l:mode, 'paste')
|
call add(l:mode, 'paste')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if g:airline_detect_crypt && !empty(&key)
|
if g:airline_detect_crypt && exists("+key") && !empty(&key)
|
||||||
call add(l:mode, 'crypt')
|
call add(l:mode, 'crypt')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ function! airline#parts#mode()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#parts#crypt()
|
function! airline#parts#crypt()
|
||||||
return g:airline_detect_crypt && !empty(&key) ? g:airline_symbols.crypt : ''
|
return g:airline_detect_crypt && exists("+key") && !empty(&key) ? g:airline_symbols.crypt : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#parts#paste()
|
function! airline#parts#paste()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user