mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Show an error if FileReadCmd can't open the file
Signed-off-by: James McCoy <jamessan@jamessan.com>
This commit is contained in:
@@ -473,6 +473,14 @@ function s:GPGDecrypt(bufread)
|
|||||||
|
|
||||||
" File doesn't exist yet, so nothing to decrypt
|
" File doesn't exist yet, so nothing to decrypt
|
||||||
if !filereadable(filename)
|
if !filereadable(filename)
|
||||||
|
if !a:bufread
|
||||||
|
redraw!
|
||||||
|
echohl GPGError
|
||||||
|
echom "E484: Can't open file" filename
|
||||||
|
echohl None
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
" Allow the user to define actions for GnuPG buffers
|
" Allow the user to define actions for GnuPG buffers
|
||||||
silent doautocmd User GnuPG
|
silent doautocmd User GnuPG
|
||||||
silent execute ':doautocmd BufNewFile ' . fnameescape(autocmd_filename)
|
silent execute ':doautocmd BufNewFile ' . fnameescape(autocmd_filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user