From 9a15ce7ef1e18041792b202e713f5c17b5c57fa3 Mon Sep 17 00:00:00 2001 From: Markus Braun Date: Wed, 13 Dec 2006 16:04:30 +0000 Subject: [PATCH] Only undo encryption of buffer content for encrypted files. --- plugin/gnupg.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index e4fc41c..b3c3d4d 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -86,7 +86,7 @@ autocmd BufWritePre,FileWritePre *.\(gpg\|asc\|pgp\) set bin autocmd BufWritePre,FileWritePre *.\(gpg\|asc\|pgp\) call s:GPGEncrypt() " Undo the encryption so we are back in the normal text, directly " after the file has been written. -autocmd BufWritePost,FileWritePost *.\(gpg\|asc\|pgp\) silent u +autocmd BufWritePost,FileWritePost *.\(gpg\|asc\|pgp\) if (exists("b:GPGEncrypted") && b:GPGEncrypted == 1) | silent u | endi " Switch back to normal mode for editing autocmd BufWritePost,FileWritePost *.\(gpg\|asc\|pgp\) set nobin augroup END