Show an error if the buffer is not prepared for writing an encrypted file.

This commit is contained in:
Markus Braun 2009-09-24 07:18:49 +00:00
parent 062524c107
commit e53b79872a

View File

@ -414,9 +414,9 @@ function s:GPGEncrypt()
set bin set bin
" guard for unencrypted files " guard for unencrypted files
if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0) if (!exists("b:GPGEncrypted") || b:GPGEncrypted == 0)
echohl GPGWarning echohl GPGError
echom "File is not encrypted, all GPG functions disabled!" let blackhole = input("Message could not be encrypted! File might be empty! (Press ENTER)")
echohl None echohl None
return return
endif endif