mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Only undo encryption of buffer content for encrypted files.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user