diff --git a/plugin/todoer.lua b/plugin/todoer.lua index 3249e02..6558778 100644 --- a/plugin/todoer.lua +++ b/plugin/todoer.lua @@ -58,7 +58,7 @@ local function add_todo() local line = vim.api.nvim_get_current_line() - if string.match(line, openpattern) == false and string.match(line, closedpattern) == false then + if not string.match(line, openpattern) and not string.match(line, closedpattern) then line = "- [ ] " .. line vim.api.nvim_set_current_line(line) vim.api.nvim_feedkeys("A", "n", true)