From faa3d652e317d2e4490a1a19fcb1d65eda6b78d7 Mon Sep 17 00:00:00 2001 From: matt-garman Date: Tue, 5 Feb 2013 11:52:40 -0600 Subject: [PATCH] Update plugin/gnupg.vim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- plugin/gnupg.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index a3c5983..a87070d 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -374,7 +374,7 @@ function s:GPGDecrypt(bufread) let filename = expand(":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