Only undo encryption of buffer content for encrypted files.

This commit is contained in:
Markus Braun 2006-12-13 16:04:30 +00:00
parent 4771cc9025
commit 9a15ce7ef1

View File

@ -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