From 3e060c5ea0ee5438e06e100181d86ddb5da93ac4 Mon Sep 17 00:00:00 2001 From: Jonty Wareing Date: Fri, 22 Feb 2013 19:39:38 +0000 Subject: [PATCH] Edit recipients when opening a new file The previous behaviour of this plugin was to open the recipient pane immediately after opening a new file with the correct extension. The documentation states that this should still occur, so this commit implements the behaviour in a slightly different manner than the old plugin. --- plugin/gnupg.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index fa42acd..974d328 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -389,6 +389,13 @@ function s:GPGDecrypt(bufread) " File doesn't exist yet, so nothing to decrypt if empty(glob(filename)) + + " This is a new file, so force the user to edit the recipient list if + " they open a new file and public keys are preferred + if (exists("g:GPGPreferSymmetric") && g:GPGPreferSymmetric == 0) + call s:GPGEditRecipients() + endif + return endif