diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index da5768e..bf83468 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -1,5 +1,5 @@ " Name: gnupg.vim -" Last Change: 2018 Jun 22 +" Last Change: 2018 Aug 06 " Maintainer: James McCoy " Original Author: Markus Braun " Summary: Vim plugin for transparent editing of gpg encrypted files. @@ -590,7 +590,7 @@ function s:GPGDecrypt(bufread) if b:GPGEncrypted " check if the message is armored - if (match(output, "gpg: armor header") >= 0) + if readfile(filename, '', 1)[0] =~# '^-\{5}BEGIN PGP\%( SIGNED\)\= MESSAGE-\{5}$' call s:GPGDebug(1, "this file is armored") let b:GPGOptions += ["armor"] endif