Skip to content

Commit

Permalink
fix: don't allow TODOs with nested items of the same type to be given…
Browse files Browse the repository at this point in the history
… the pending status
  • Loading branch information
vhyrro committed Mar 28, 2024
1 parent 71e2f05 commit 5942fdf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lua/neorg/modules/core/qol/todo_items/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 <pysan3>
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

Expand Down

0 comments on commit 5942fdf

Please sign in to comment.