From a3f589f5e269a73d6a19eca096b259be9ffb04d3 Mon Sep 17 00:00:00 2001 From: Markus Braun Date: Tue, 5 Aug 2008 10:51:48 +0000 Subject: [PATCH] Make sure the variable "g:GPGDefaultRecipients" exists --- plugin/gnupg.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index befe6e7..61660c2 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -152,6 +152,11 @@ function s:GPGInit() let g:GPGPreferArmor = 0 endif + " check if debugging is turned on + if (!exists("g:GPGDefaultRecipients")) + let g:GPGDefaultRecipients = [] + endif + " check if debugging is turned on if (!exists("g:GPGDebugLevel")) let g:GPGDebugLevel = 0 @@ -559,7 +564,7 @@ function s:GPGEditRecipients() let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(getbufvar(b:GPGCorrespondingTo, "GPGRecipients")) " 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([])) let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(g:GPGDefaultRecipients) else