From 45fdaf52ed9e840f5a29201d2e572583f8279546 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 17 Dec 2016 20:51:26 -0500 Subject: [PATCH] GPGCleanup: Use "only!" to force hiding modified buffers In dda14abb3c51166553015ef489e9ac9acb859904, GPGCleanup added 'set buffhidden=hide' to try avoiding error messages when modified buffers are being abandoned. However, that only works if the buffer is the last visible buffer. If there are windows displaying multiple buffers, then errors can still be emitted. Using "only!" ensures all the other windows can be closed. Signed-off-by: James McCoy --- plugin/gnupg.vim | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index b5011a6..a36b351 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -1,5 +1,5 @@ " Name: gnupg.vim -" Last Change: 2016 Dec 14 +" Last Change: 2016 Dec 17 " Maintainer: James McCoy " Original Author: Markus Braun " Summary: Vim plugin for transparent editing of gpg encrypted files. @@ -420,11 +420,8 @@ 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 + new +only! redraw! call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGCleanup()")