aboutsummaryrefslogtreecommitdiff
path: root/lua/denote/api.lua
diff options
context:
space:
mode:
authorHumanEntity <human_entity@icloud.com>2023-12-25 14:25:26 +0100
committerHumanEntity <human_entity@icloud.com>2023-12-25 14:25:26 +0100
commitf85e0ed99bdc22c0050cef9b80844c983588ae62 (patch)
tree4ecdba07e4abcdaaf7e343935f5638e4f5e71ded /lua/denote/api.lua
parent85c318d6c20f69ea93648f4234de7e1916e14359 (diff)
downloadsimple-denote.nvim-f85e0ed99bdc22c0050cef9b80844c983588ae62.tar.gz
Added some checks for specifying tags
Diffstat (limited to 'lua/denote/api.lua')
-rw-r--r--lua/denote/api.lua4
1 files changed, 4 insertions, 0 deletions
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