Initialize b:GPGRecipients with g:GPGDefaultRecipients

Signed-off-by: James Vega <vega.james@gmail.com>
This commit is contained in:
James Vega 2011-10-13 17:22:09 -04:00
parent df5f4d51bf
commit 21eed8f06b

View File

@ -344,15 +344,19 @@ function s:GPGDecrypt()
" get the filename of the current buffer " get the filename of the current buffer
let filename = expand("<afile>:p") let filename = expand("<afile>:p")
" clear GPGRecipients and GPGOptions
let b:GPGRecipients = g:GPGDefaultRecipients
let b:GPGOptions = []
" File doesn't exist yet, so nothing to decrypt " File doesn't exist yet, so nothing to decrypt
if empty(glob(filename)) if empty(glob(filename))
return return
endif 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:GPGEncrypted = 0
let b:GPGRecipients = []
let b:GPGOptions = []
" find the recipients of the file " 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) let commandline = s:GPGCommand . " --verbose --decrypt --list-only --dry-run --batch --no-use-agent --logger-fd 1 " . shellescape(filename)