Update plugin/gnupg.vim

Need to use copy() when setting b:GPGRecipients in GPGDecrypt(), otherwise the local variable will act as a reference to the global one.  The result will be that the global default recipient list will become a super-set of recipients as multiple gpg files are opened.
This commit is contained in:
matt-garman 2013-02-05 11:52:40 -06:00
parent dcb9d3764a
commit faa3d652e3

View File

@ -374,7 +374,7 @@ function s:GPGDecrypt(bufread)
let filename = expand("<afile>:p")
" clear GPGRecipients and GPGOptions
let b:GPGRecipients = g:GPGDefaultRecipients
let b:GPGRecipients = copy(g:GPGDefaultRecipients)
let b:GPGOptions = []
" File doesn't exist yet, so nothing to decrypt