From abde05a54f5eba19be63e708c1e4a6a6d57f4dd5 Mon Sep 17 00:00:00 2001 From: borja Date: Mon, 27 Nov 2023 23:34:10 +0100 Subject: [PATCH] test --- plugin/todoer.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/todoer.lua b/plugin/todoer.lua index 5c058a4..79556c6 100644 --- a/plugin/todoer.lua +++ b/plugin/todoer.lua @@ -57,8 +57,9 @@ local function add_todo() local closedpattern = "^%s*%- %[[x]%]" local line = vim.api.nvim_get_current_line() - local spaces = string.find(line, "%S") + local spaces = string.match(line, "^%s*") print(spaces) + -- if not string.match(line, openpattern) and not string.match(line, closedpattern) then -- line = spaces .. "- [ ] " .. line -- vim.api.nvim_set_current_line(line)