diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index 5e47bd9..f6498eb 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -675,7 +675,10 @@ function s:GPGEncrypt() endif call rename(destfile, resolve(expand(''))) - setl nomodified + if auType == 'BufWrite' + setl nomodified + endif + silent exe ':doautocmd '. auType .'Post '. fnameescape(expand(':r')) call s:GPGDebug(2, 'called '. auType .'Post autocommand for ' . fnameescape(expand(':r')))