Skip to content

Commit 4b8e64a

Browse files
committed
fix(todo_items): update parent node when child state is changed
1 parent c429af2 commit 4b8e64a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/neorg/modules/core/qol/todo_items/module.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ module.private = {
354354
local row, _, _, column = node:named_child(0):range() ---@diagnostic disable-line -- TODO: type error workaround <pysan3>
355355

356356
vim.api.nvim_buf_set_text(buf, row, column, row, column, { "(" .. char .. ") " })
357+
module.private.update_parent(buf, row, 0)
357358
else
358359
local range = module.required["core.integrations.treesitter"].get_node_range(first_status_extension)
359360

@@ -367,6 +368,7 @@ module.private = {
367368
range.column_end,
368369
{ char }
369370
)
371+
module.private.update_parent(buf, range.row_start, 0)
370372
end
371373

372374
for child in node:iter_children() do ---@diagnostic disable-line -- TODO: type error workaround <pysan3>

0 commit comments

Comments
 (0)