From 5942fdf7eb42b6364ca0a754ac88bd0ca05ae660 Mon Sep 17 00:00:00 2001 From: Vhyrro Date: Thu, 28 Mar 2024 12:47:16 +0100 Subject: [PATCH] fix: don't allow TODOs with nested items of the same type to be given the pending status --- lua/neorg/modules/core/qol/todo_items/module.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/neorg/modules/core/qol/todo_items/module.lua b/lua/neorg/modules/core/qol/todo_items/module.lua index 890cc7143..b593b6c50 100644 --- a/lua/neorg/modules/core/qol/todo_items/module.lua +++ b/lua/neorg/modules/core/qol/todo_items/module.lua @@ -393,12 +393,10 @@ module.public = { local next = types[index] or types[1] - if not next then - for child in todo_item_at_cursor:iter_children() do ---@diagnostic disable-line -- TODO: type error workaround - if module.public.get_todo_item_type(child) then - next = alternative_types[get_index(alternative_types, todo_item_type)] - break - end + for child in todo_item_at_cursor:iter_children() do + if module.public.get_todo_item_type(child) then + next = alternative_types[get_index(alternative_types, todo_item_type)] + break end end