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:
parent
dcb9d3764a
commit
faa3d652e3
@ -374,7 +374,7 @@ function s:GPGDecrypt(bufread)
|
|||||||
let filename = expand("<afile>:p")
|
let filename = expand("<afile>:p")
|
||||||
|
|
||||||
" clear GPGRecipients and GPGOptions
|
" clear GPGRecipients and GPGOptions
|
||||||
let b:GPGRecipients = g:GPGDefaultRecipients
|
let b:GPGRecipients = copy(g:GPGDefaultRecipients)
|
||||||
let b:GPGOptions = []
|
let b:GPGOptions = []
|
||||||
|
|
||||||
" File doesn't exist yet, so nothing to decrypt
|
" File doesn't exist yet, so nothing to decrypt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user