mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Show an error if the buffer is not prepared for writing an encrypted file.
This commit is contained in:
@@ -414,9 +414,9 @@ function s:GPGEncrypt()
|
||||
set bin
|
||||
|
||||
" guard for unencrypted files
|
||||
if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0)
|
||||
echohl GPGWarning
|
||||
echom "File is not encrypted, all GPG functions disabled!"
|
||||
if (!exists("b:GPGEncrypted") || b:GPGEncrypted == 0)
|
||||
echohl GPGError
|
||||
let blackhole = input("Message could not be encrypted! File might be empty! (Press ENTER)")
|
||||
echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user