mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Unique recipient list and option list.
This commit is contained in:
@@ -644,12 +644,16 @@ fun s:GPGFinishRecipientsBuffer()
|
||||
if (strlen(recipient) > 0)
|
||||
let gpgid=s:GPGNameToID(recipient)
|
||||
if (strlen(gpgid) > 0)
|
||||
if (match(GPGRecipients, gpgid) < 0)
|
||||
let GPGRecipients+=[gpgid]
|
||||
endi
|
||||
else
|
||||
if (match(GPGUnknownRecipients, recipient) < 0)
|
||||
let GPGUnknownRecipients+=[recipient]
|
||||
echohl GPGWarning
|
||||
echom "The recipient " . recipient . " is not in your public keyring!"
|
||||
echohl None
|
||||
endi
|
||||
end
|
||||
endi
|
||||
|
||||
@@ -820,7 +824,7 @@ fun s:GPGFinishOptionsBuffer()
|
||||
let option=substitute(option, "^GPG:.*$", "", "")
|
||||
|
||||
" only do this if the line is not empty
|
||||
if (strlen(option) > 0)
|
||||
if (strlen(option) > 0 && match(GPGOptions, option) < 0)
|
||||
let GPGOptions+=[option]
|
||||
endi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user