From 4340361541f265de03e08737258b5ae448b11896 Mon Sep 17 00:00:00 2001 From: Markus Braun Date: Tue, 5 Jul 2011 12:32:37 +0200 Subject: [PATCH] Recipients and unknownRecipients was not ensured to be a list --- plugin/gnupg.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index 6dbe455..01b3405 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -567,6 +567,10 @@ function s:GPGEditRecipients() " put the recipients in the scratch buffer let recipients=getbufvar(b:corresponding_to, "GPGRecipients") + if (type(recipients) != type([])) + unlet recipients + let recipients=[] + endif for name in recipients let name=s:GPGIDToName(name) @@ -575,6 +579,10 @@ function s:GPGEditRecipients() " put the unknown recipients in the scratch buffer let unknownRecipients=getbufvar(b:corresponding_to, "GPGUnknownRecipients") + if (type(unknownRecipients) != type([])) + unlet unknownRecipients + let unknownRecipients=[] + endif let syntaxPattern="\\(nonexistingwordinthisbuffer" for name in unknownRecipients let name="!" . name