mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Set "buftype=acwrite" for encrypted buffers
This ensures any write of the buffer requires a configured BufWriteCmd autocmd, providing more safe guards against problems like jamessan/vim-gnupg#77. Signed-off-by: James McCoy <jamessan@jamessan.com>
This commit is contained in:
@@ -583,6 +583,8 @@ function s:GPGDecrypt(bufread)
|
||||
call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGDecrypt()")
|
||||
return
|
||||
endif
|
||||
" Ensure the buffer is only saved by using our BufWriteCmd
|
||||
set buftype=acwrite
|
||||
else
|
||||
execute silent 'read' fnameescape(filename)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user