Skip to content

Commit

Permalink
Show an error if FileReadCmd can't open the file
Browse files Browse the repository at this point in the history
Signed-off-by: James McCoy <jamessan@jamessan.com>
  • Loading branch information
jamessan committed Jan 24, 2018
1 parent 6be6f96 commit fa3a630
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugin/gnupg.vim
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,14 @@ function s:GPGDecrypt(bufread)

" File doesn't exist yet, so nothing to decrypt
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
silent doautocmd User GnuPG
silent execute ':doautocmd BufNewFile ' . fnameescape(autocmd_filename)
Expand Down

0 comments on commit fa3a630

Please sign in to comment.