From 21eed8f06b71536fac35d28720c5939b8e2833e2 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 13 Oct 2011 17:22:09 -0400 Subject: [PATCH] Initialize b:GPGRecipients with g:GPGDefaultRecipients Signed-off-by: James Vega --- plugin/gnupg.vim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index 81cda0d..0b6c3f2 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -344,15 +344,19 @@ function s:GPGDecrypt() " get the filename of the current buffer let filename = expand(":p") + " clear GPGRecipients and GPGOptions + let b:GPGRecipients = g:GPGDefaultRecipients + let b:GPGOptions = [] + " File doesn't exist yet, so nothing to decrypt if empty(glob(filename)) return endif - " clear GPGEncrypted, GPGRecipients and GPGOptions + " Only let this if the file actually exists, otherwise GPG functionality + " will be disabled when editing a buffer that doesn't yet have a backing + " file let b:GPGEncrypted = 0 - let b:GPGRecipients = [] - let b:GPGOptions = [] " find the recipients of the file let commandline = s:GPGCommand . " --verbose --decrypt --list-only --dry-run --batch --no-use-agent --logger-fd 1 " . shellescape(filename)