From e53b79872ae4ef6717534b20f45a871ea364a086 Mon Sep 17 00:00:00 2001 From: Markus Braun Date: Thu, 24 Sep 2009 07:18:49 +0000 Subject: [PATCH] Show an error if the buffer is not prepared for writing an encrypted file. --- plugin/gnupg.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index 3fe1ba9..f9cece0 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -414,9 +414,9 @@ function s:GPGEncrypt() set bin " guard for unencrypted files - if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0) - echohl GPGWarning - echom "File is not encrypted, all GPG functions disabled!" + if (!exists("b:GPGEncrypted") || b:GPGEncrypted == 0) + echohl GPGError + let blackhole = input("Message could not be encrypted! File might be empty! (Press ENTER)") echohl None return endif