From ac45a5969e65a6a5e58e00c7dd87ea70bdbc9a64 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 30 May 2012 22:18:34 -0400 Subject: [PATCH] Don't wipeout the current buffer if FileReadCmd failed Signed-off-by: James McCoy --- plugin/gnupg.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index 1e191bd..c564432 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -456,7 +456,11 @@ function s:GPGDecrypt(bufread) echohl GPGError let blackhole = input("Message could not be decrypted! (Press ENTER)") echohl None - silent bwipeout! + " Only wipeout the buffer if we were creating one to start with. + " FileReadCmd just reads the content into the existing buffer + if a:bufread + silent bwipeout! + endif call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGDecrypt()") return endif