Last active
August 29, 2015 14:22
-
-
Save chrisbra/ff7162fbcec28cd795f6 to your computer and use it in GitHub Desktop.
vim-airline crypt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/autoload/airline.vim b/autoload/airline.vim | |
index ef74298..0b66c7d 100644 | |
--- a/autoload/airline.vim | |
+++ b/autoload/airline.vim | |
@@ -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 | |
diff --git a/autoload/airline/parts.vim b/autoload/airline/parts.vim | |
index bc5ba95..45761bd 100644 | |
--- a/autoload/airline/parts.vim | |
+++ b/autoload/airline/parts.vim | |
@@ -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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment