Make sure the variable "g:GPGDefaultRecipients" exists

This commit is contained in:
Markus Braun
2008-08-05 10:51:48 +00:00
parent 9278fb2d33
commit a3f589f5e2

View File

@@ -152,6 +152,11 @@ function s:GPGInit()
let g:GPGPreferArmor = 0 let g:GPGPreferArmor = 0
endif endif
" check if debugging is turned on
if (!exists("g:GPGDefaultRecipients"))
let g:GPGDefaultRecipients = []
endif
" check if debugging is turned on " check if debugging is turned on
if (!exists("g:GPGDebugLevel")) if (!exists("g:GPGDebugLevel"))
let g:GPGDebugLevel = 0 let g:GPGDebugLevel = 0
@@ -559,7 +564,7 @@ function s:GPGEditRecipients()
let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(getbufvar(b:GPGCorrespondingTo, "GPGRecipients")) let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(getbufvar(b:GPGCorrespondingTo, "GPGRecipients"))
" if there are no known or unknown recipients, use the default ones " if there are no known or unknown recipients, use the default ones
if (exists("g:GPGDefaultRecipients") && len(recipients) == 0 && len(unknownrecipients) == 0) if (len(recipients) == 0 && len(unknownrecipients) == 0)
if (type(g:GPGDefaultRecipients) == type([])) if (type(g:GPGDefaultRecipients) == type([]))
let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(g:GPGDefaultRecipients) let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(g:GPGDefaultRecipients)
else else