diff --git a/plugin/todoer.lua b/plugin/todoer.lua index 0cd80a1..e4f8ace 100644 --- a/plugin/todoer.lua +++ b/plugin/todoer.lua @@ -61,7 +61,8 @@ local function add_todo() local spaces = string.match(line, "^%s*") if not string.match(line, openpattern) and not string.match(line, closedpattern) then - line = spaces .. "- [ ] " .. line + local templine = spaces .. "- [ ] " + line = templine .. line vim.api.nvim_set_current_line(line) -- if not string.sub(line, 1, 1) == " " then -- line = "- [ ] " .. line