From f85e0ed99bdc22c0050cef9b80844c983588ae62 Mon Sep 17 00:00:00 2001 From: HumanEntity Date: Mon, 25 Dec 2023 14:25:26 +0100 Subject: Added some checks for specifying tags --- lua/denote/api.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/denote/api.lua b/lua/denote/api.lua index 7213f8c..277827f 100644 --- a/lua/denote/api.lua +++ b/lua/denote/api.lua @@ -29,6 +29,7 @@ end ---@param date DenoteDate|nil ---@param name string|nil +---@param tags table|nil function M.search(date, name, tags) if not date then vim.ui.input({ prompt = "Date: " }, function(input) @@ -54,6 +55,9 @@ function M.search(date, name, tags) if not tags then vim.ui.input({ prompt = "Tags: " }, function(input) + if input == "" then + return + end tags = util.splitstring(input, " ") end) end -- cgit v1.2.3