mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
GPGCleanup: Use "only!" to force hiding modified buffers
In dda14abb3c, 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 <jamessan@jamessan.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
" Name: gnupg.vim
|
||||
" Last Change: 2016 Dec 14
|
||||
" Last Change: 2016 Dec 17
|
||||
" Maintainer: James McCoy <jamessan@jamessan.com>
|
||||
" Original Author: Markus Braun <markus.braun@krawel.de>
|
||||
" 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()")
|
||||
|
||||
Reference in New Issue
Block a user