From d6ff3d5d8698bc417d45ff3bac045fe06cf1d32a Mon Sep 17 00:00:00 2001 From: max397574 Date: Mon, 14 Mar 2022 12:45:51 +0100 Subject: [PATCH] fix(project_tasks): jump to project if it's empty --- lua/telescope/_extensions/neorg/find_project_tasks.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/telescope/_extensions/neorg/find_project_tasks.lua b/lua/telescope/_extensions/neorg/find_project_tasks.lua index 5571821..920e7a2 100644 --- a/lua/telescope/_extensions/neorg/find_project_tasks.lua +++ b/lua/telescope/_extensions/neorg/find_project_tasks.lua @@ -139,6 +139,12 @@ return function(opts) actions_set.select:replace(function() local entry = state.get_selected_entry() actions.close(prompt_bufnr) + local tasks = get_task_list(entry) + if #tasks == 0 then + neorg.modules.get_module("core.gtd.ui").callbacks.goto_task_function(entry.value) + return true + end + pick_tasks(entry.value) end) return true