fix(buffer): use task sentinel in open_line for better unsaved-task errors

This commit is contained in:
Barrett Ruth 2026-03-06 11:42:15 -05:00
parent 133369b968
commit 2a654ad27d

View file

@ -133,7 +133,7 @@ function M.open_line(above)
local insert_row = above and (row - 1) or row
vim.bo[bufnr].modifiable = true
vim.api.nvim_buf_set_lines(bufnr, insert_row, insert_row, false, { '- [ ] ' })
table.insert(_meta, insert_row + 1, { type = 'blank' })
table.insert(_meta, insert_row + 1, { type = 'task' })
vim.api.nvim_win_set_cursor(0, { insert_row + 1, 6 })
vim.cmd('startinsert!')
end