From 4a649a2dceee19e6f3ddc2c10f7e9621156b5e56 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 28 Oct 2012 16:44:07 -0400 Subject: [PATCH] Reduce "$GPG_TTY unset" message to one line and highlight as a warning. It's possible that gpg will work fine without $GPG_TTY being set (e.g., when using a GUI pinentry program). Therefore, the message should be classified as a warning, not an error. Also, use a single :echom to ensure the user sees the entire message, not just "gpg-agent might not work." First part of GH #1 Signed-off-by: James McCoy --- plugin/gnupg.vim | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index 97539c5..69e6e51 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -1,5 +1,5 @@ " Name: gnupg.vim -" Last Change: 2012 May 31 +" Last Change: 2012 Oct 28 " Maintainer: James McCoy " Original Author: Markus Braun " Summary: Vim plugin for transparent editing of gpg encrypted files. @@ -267,9 +267,8 @@ function s:GPGInit(bufread) let $GPG_TTY = system("tty") if (v:shell_error) let $GPG_TTY = "" - echohl GPGError - echom "The GPG_TTY is not set and no TTY could be found using the `tty` command!" - echom "gpg-agent might not work." + echohl GPGWarning + echom "$GPG_TTY is not set and the `tty` command failed! gpg-agent might not work." echohl None endif endif