aboutsummaryrefslogtreecommitdiff
path: root/lua/encrypt/encrypt.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/encrypt/encrypt.lua')
-rw-r--r--lua/encrypt/encrypt.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/encrypt/encrypt.lua b/lua/encrypt/encrypt.lua
index 93d2b78..c7efb1f 100644
--- a/lua/encrypt/encrypt.lua
+++ b/lua/encrypt/encrypt.lua
@@ -12,6 +12,10 @@ end
local function encrypt()
local password = helpers.getPassword()
+ if not password then
+ vim.notify("Password can not be empty", vim.log.levels.ERROR)
+ return
+ end
local buf_lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
local encrypted_lines = encrypt_lines(buf_lines, password)