Unique recipient list and option list.

This commit is contained in:
Markus Braun
2011-07-05 09:35:33 +02:00
parent 3aa8e8d1dd
commit 6c6b8b156c

View File

@@ -644,12 +644,16 @@ fun s:GPGFinishRecipientsBuffer()
if (strlen(recipient) > 0) if (strlen(recipient) > 0)
let gpgid=s:GPGNameToID(recipient) let gpgid=s:GPGNameToID(recipient)
if (strlen(gpgid) > 0) if (strlen(gpgid) > 0)
if (match(GPGRecipients, gpgid) < 0)
let GPGRecipients+=[gpgid] let GPGRecipients+=[gpgid]
endi
else else
if (match(GPGUnknownRecipients, recipient) < 0)
let GPGUnknownRecipients+=[recipient] let GPGUnknownRecipients+=[recipient]
echohl GPGWarning echohl GPGWarning
echom "The recipient " . recipient . " is not in your public keyring!" echom "The recipient " . recipient . " is not in your public keyring!"
echohl None echohl None
endi
end end
endi endi
@@ -820,7 +824,7 @@ fun s:GPGFinishOptionsBuffer()
let option=substitute(option, "^GPG:.*$", "", "") let option=substitute(option, "^GPG:.*$", "", "")
" only do this if the line is not empty " only do this if the line is not empty
if (strlen(option) > 0) if (strlen(option) > 0 && match(GPGOptions, option) < 0)
let GPGOptions+=[option] let GPGOptions+=[option]
endi endi