From 86514ef2d77dc16172d239a27470c30a5234b7d4 Mon Sep 17 00:00:00 2001 From: HumanEntity Date: Sun, 24 Dec 2023 23:17:50 +0100 Subject: Added some nil checking --- lua/denote/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/denote/init.lua b/lua/denote/init.lua index 814653f..b96704b 100644 --- a/lua/denote/init.lua +++ b/lua/denote/init.lua @@ -26,11 +26,15 @@ function M.note() end) vim.ui.input({ prompt = "Enter tags: " }, function(input) - if input ~= "" then + if input ~= "" and input then tags = splitspace(input) end end) + if name == "" then + error("Didn't specify name") + end + U.note(name, tags) end -- cgit v1.2.3