mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Make sure the variable "g:GPGDefaultRecipients" exists
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user