diff options
Diffstat (limited to 'lua/muwiki/todo.lua')
| -rw-r--r-- | lua/muwiki/todo.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/muwiki/todo.lua b/lua/muwiki/todo.lua index 6978c54..5b7d1a3 100644 --- a/lua/muwiki/todo.lua +++ b/lua/muwiki/todo.lua @@ -81,12 +81,12 @@ function M.toggle_list_item(bufnr, node) for child in node:iter_children() do local child_type = child:type() if child_type == 'task_list_marker_unchecked' then - -- Replace [ ] with [x] + -- Replace [ ] with [X] local start_row, start_col, end_row, end_col = child:range() - vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[x]' }) - return 'x' + vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[X]' }) + return 'X' elseif child_type == 'task_list_marker_checked' then - -- Replace [x] with [ ] + -- Replace [X] with [ ] local start_row, start_col, end_row, end_col = child:range() vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[ ]' }) return ' ' @@ -119,10 +119,10 @@ end function M.force_list_item_state(bufnr, node, target_state) for child in node:iter_children() do local child_type = child:type() - if child_type == 'task_list_marker_unchecked' and target_state == 'x' then + if child_type == 'task_list_marker_unchecked' and target_state == 'X' then -- Need to check it local start_row, start_col, end_row, end_col = child:range() - vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[x]' }) + vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[X]' }) return elseif child_type == 'task_list_marker_checked' and target_state == ' ' then -- Need to uncheck it |
