Merge pull request #794 from hpurmann/fix_nvim_key

Add checks for existing key to make #786 work in neovim
This commit is contained in:
Bailey Ling 2015-06-09 16:00:30 -04:00
commit 14759c1b57
2 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ function! airline#check_mode(winnr)
call add(l:mode, 'paste')
endif
if g:airline_detect_crypt && !empty(&key)
if g:airline_detect_crypt && exists("+key") && !empty(&key)
call add(l:mode, 'crypt')
endif

View File

@ -55,7 +55,7 @@ function! airline#parts#mode()
endfunction
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
function! airline#parts#paste()