From dda14abb3c51166553015ef489e9ac9acb859904 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 14 Dec 2016 23:05:40 -0500 Subject: [PATCH] GPGCleanup: Allow the buffer to be hidden on exit When Vim has decided it can exit, GPGCleanup forces a blank buffer to take over the screen so contents aren't visible in scrollback. However, if the buffer is modified and 'hidden' isn't set then the command will fail. Force the buffer to be hidden, so this is avoided. Signed-off-by: James McCoy --- plugin/gnupg.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index f26a314..b5011a6 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -1,5 +1,5 @@ " Name: gnupg.vim -" Last Change: 2016 Dec 04 +" Last Change: 2016 Dec 14 " Maintainer: James McCoy " Original Author: Markus Braun " Summary: Vim plugin for transparent editing of gpg encrypted files. @@ -420,6 +420,9 @@ endfunction function s:GPGCleanup() call s:GPGDebug(3, ">>>>>>>> Entering s:GPGCleanup()") + " Ensure we can hide the buffer + setlocal bufhidden=hide + " wipe out screen new +only redraw!